SlideShare a Scribd company logo
SCMNCE
RELIGIOI
From Conflict to Conversation
John F. Haught
PAULIST PRESS
New York . Mahwah, N.J.
also by Jolm E Haught
publÍshed by Paulist Press
THE PROMISE OFNATURE.
WHAT IS COD?
WHATIS RELIGION?
Copyright @ 1995 by John F. Haught
All rights reserved. No part of this book may be reproduced or
transmined in any form
or by any means, electronic or mechanicar, incruàing
photocopying, rccording or by
any information storage and retrieval system without permissiôn
in writing fàm the
h¡blisher.
Library of Congress Cataloging-in-publication Data
Haught. John F.
science and religion : from confricr to conversation / John F.
Haught.
P. cm.
Includes bibliographical references and index.
ISBN 0-8091-3606-6 (alk. paper): 04784 (clorh)
l. Religion and science. 2. Religion and science_Hisrory.
I. Tltle.
8L24.0.2.H385 r99s
291.rt15;4¿20
'!1
.i'r¡Ut¡sneO by Paulist Press
997 Maca¡thur Boqlevard
Mahwah, New Jersey 07430
Printed and bound in the
United Søtes of America
95-32t24
CIP
Contents
Preface ......... I
Introduction .....3
l. Is Religion Opposed to Science? . . . . 9
2. Does Science Rule Out a Personal God? . -.... . .n
3. Does Evolution Rule Out God's Existence? . . . . . .47
4.IsLifeReducibletoChemistry? .... .....72
S.WastheUniverseCreated? ......100
6. DoWeBelongHere? .....120
7. Why Is There Complexity in Nature? . . . .I4Z
8. DoestheUniverseHaveaPurpose? .....L62
9. Is Religion Responsible for the Ecological Crisis? . . . . . tg3
Conclusion: Toward Conversation in Science and Religion .... ..
.ZOz
Notes ..204
Index . .......216
5
Was the fJniverse Created?
No teaching is more vital to the God-religions than that of
creation.
This doctrine interprets the universe fundamentally as a gift
freely
brought into existence by a powerft.rl, loving and personal
"Creator."
The cosmos, in other words, is not self-originating, but the
product of a
transcendent goodness. The Hebrew scriptures tell us that "in
the begin-
ning" it was God who made the heavens and the earth. And
traditional
Ch¡istian and Muslim theism even maintains that God creates
the world
ex nihilo, out of nothing. What bearing, then, does modern
science have
on the believability of this most fundamental of Western
religious teach-
ings? Does science make the doctrine of creation less or more
credible?
The British scientist Peter Atkins bluntly answers that modern
cos-
mology renders the notion of creation by God completely
superfluous.'
And althoughAtkins himself seems undisturbed by it, his
interpretation
strikes at the heart of what many consider one of the most
important
truths in their lives. To religious believers the doctrine of
creation is
much more than a story intended to satisfy human curiosity
about how
everything began. Its import goes much deeper, for it speaks
directly to
a common human concern about whether there are any realistic
grounds for hope in the meaning of our lives and of the
universe.
If a transcendent power and beneficence brought the universe
into
being, then this Same power and goodness could surely also
deliver us
from all evils and lead us to the fulfillment for which we long.
A God
capable of bringing this whole universe into existence would
have the
power also to bring about salvation for those in despair. A
Creator
could even bring the dead back to life. The existence of a
Creator
would mean that there is a reason to believe that the entire
universe has
tnn
Was the Universe Created? l0l
a deep significance to it, even though we may not know now
exactly
what it is.
How momentous a thing it would be, then, if science either gave
fresh support to or placed under new suspicion the credibility of
this
central religious teaching. Is it any wonder that some of the
liveliest
discussions in science and religion today have to do with the
creation of
the universe?
The recently formulated "big bang" theory of cosmic origins
seems
to imply, at least at first sight, that the universe had a
beginning. And if it
had a beginning would this not perhaps mean that the biblical
idea of
divine creation as depicted in Genesis makes scientific sense
after all?,
Many scientists, as we shall see, are still uncomfortable with
the idea of
a universe that came into existence by an act of divine creation.
some of
them, fôr that matte¡ are not convinced that it ever came into
existence
at all. Perhaps the universe always was and always wiil be. But
today
ãoesn't the "big bang" theory serirously challenge such a
notion?
From antiquity philosophers have often taken it for granted that
the
universe is eternal and uncreated. Plato and Aristotle held this
opinion,
as did many of the other Greek philosophers. Democritus, long
before
Aristotle, taught that the universe was made up of "atoms and
the void"
that have existed from eternity. And, at least until very recently,
almost
all modern materialists had assumed that matter is unoriginated
and
everlasting. Science, however, now seems to have laid to rest
the idea
of an eternally existing universe. of course it has not done so
without a
struggle, and there are still many unbelievers. For a long time,
we
should recall, even Albert Einstein was convinced that the
universe
must have existed forever, and this is one reason for his
rejecting the
idea of a personal God. Such a God is simply unnecessary, he
thought,
as long as an eternally ordered universe is the matrix and source
of all
things. And so it is not su¡prising thar in spite of all the talk
today about
the big bang, some scientists still attempt to salvage the notion
of a
universe without any beginning. They do this either by way of
hypoth-
esizing the existence of an endless series of "worlds," or by
experi-
menting with other fascinating ideas that might somehow help
us evade
the conclusion that the universe had to have a beginning. If they
can
eliminate any crisp point of cosmic origins they expect thereby
to make
the notion of a Creator unnecessary.
Some theologians, as noted below, would respond that even an
eter-
nally existing universe (whatever that might mean) does not rule
out
the necessity of a creator or originator. But the su¡prising
astrophysi-
t02 Science and Religion
cal discoveries of this century have by now led most scientists
to doubt
that the universe has,in fact existed forever. The consensus of
recent
cosmology is that the universe's temporal duration, though
unimagin-
ably immense, is still finite.
And so we are left with these questions: If the universe has not
exist-
ed forever, does its origin require some transcendent cause?
And is this
alleged cause equivalent to what theism calls God? Or is it
possible that
our finite universe arose spontaneously, without any cause at
all?
Suspicion that our universe did indeed have a definite beginning
was
first aroused in this century by scientific observations that
cosmic
space is expanding. But a spatially expanding cosmos requires a
dis-
crete starting point, for if we keep going back into the remote
past
along the lines of cosmic expansion we eventually have to
arrive at a
tiny point from which the increase in size first began.
Observation now
shows that the galaxies, whose immense number was also
discovered
only in this century, are moving away from each other and that
the uni-
verse is still evolving.t So a very long time ago the whole of
physical
reality must have been squeezed into an unimaginably small and
dense
grain of matter. Particle physics now even allows that this
compact
speck may originally have been no larger than an atom's
nucleus.
Then fifteen or so billion years ago this incredibly compressed
pin-
head of matter began to "explode," creating space and time in
the
process. The resulting fireball is usually called the "big bang,"
and it is
generally associated with the beginning of the universe. In
thinking
about the big bang, then, we have apparently arrived at the
temporal
"edge" of the cosmos. And even though philosophers. scientists
and
theologians tell us to be very careful about raising silly
questions about
the big bang, it is nevertheless hard to refrain from asking
whether any-
thing lies on the other side of it. Is it nothing? Or is it God?
In 1917, while studying Einstein's newly formulated equations
on
general relativity, the Dutch physicist Willem de Sitter
concluded that
they implied a changing, expanding cosmos' If the universe
were eter-
nal and static, after all, the various masses would by now have
col-
lapsed gravitationally upon one another. So the universe must
be con-
stantly changing, and this could mean that it also had a
beginning.
Again in 1922, a Russian mathematician by the name of
Alexander
Friedmann calculated that general relativity challenges the idea
of an
eternally unchanging universe. Both De Sitter and Friedmann
wrote to
Einstein about their suspicions, but the most famous scibntist of
our
century was not ready to accept a cosmology in which the
universe
Was the (Jniverse Created? 103
arose from a singular starting point. Such singularities are not
conge-
nial, he thought, to scientific understanding, for science seeks
a universal, inielligible lawfulness. Out of his need for
universality
Einstein had always clung to the idea that the cosmos must be
eternal
and necessary rather than dynamically changing' This is why he
pre-
ferred a universe with no birth, one extending back into the
eternal
sameness of an indefinite past. And so he responded to de
Sitter's and
Friedmann,s disturbing reports by changing his original,
computations,
introducing into them an artificial and, as it turns out, purely
fictitious
"cosmological constant." Some constant repulsive feature
inhe¡ent in
the cosmols, he surmised, must keep the stars apart and prevent
the uni-
verse from collaPsing.
EdwinA bit later, however, Einstein met the American
astronomer '
Hubble who provided him with what seemed to be observational
evi-
dence of a dynamic universe. Hubble had been looking at
several
galax-
ies through the powerful Mount Wilson telescope and had
noticed
that
-
the frequàncies of the light radiating from some of them were
measur-
ably .,shifted" toward the red end of the spectrum. This could
only
mean that the light waves are longer than normal and that the
object
emitting the light must be moving away from the observer. The
best
explana:tion foi this "red-shift" phenomenon, he concluded, is
that the
gaìaxies are receding from the earth and from each other at
enormous
Ipeeds. Experimental science was now confirming the
expanding uni-
*rs" preoicted by Einstein's equations. Einstein was forced to
concede
the point, and he later admitted that his introduction of the
"cosmologi-
cal constant" was an enollnous blunder'
And yet, misgivings about the big bang continued even after
Hubble's disclosures. It was difhcult for many scientists to
break away
from their longing for a more stable universe. The new theory
was
given a considãrable boost, however, when in 1965 scientists
Robert
wil.on and Arno Penzias discovered a low temperature cosmic
back-
ground microwave radiation which could best be interpreted as
the
;afterglow" of an initial hot big bang. This radiation was the
clearest
signaito date that a singular originating cosmic event had
occurred
some fifteen billion years ago. It was now getting harder to
doubt that
the universe began with something like the big bang'
But doubts still lingered on, and perhaps for good reason' The
big
bang theory of cosmic origins seemed to imply that the universe
ema-
natiig from the initial expansion would be smooth and uniform
in all
directions. Yet astronomy now makes us realize more clearly
than ever
104 Science and Religion
that we live in a very lumpy universe. That is, cosmic matter
comes
together in huge clots,in some places while being more thinly
scattered
elsewhere. Our cosmos is made up of very unevenly distributed
galax-
ies, clusters and super-clusters of galaxies, stars, planets, gases
and
other not yet fully understood kinds of matter. Immense empty
spaces,
for example, separate some groupings of galaxies, while others
are more
intimately connected. If the universe really began with a smooth
big
bang, then how could it have gotten so far removed from
uniform distri-
bution of matter today? To produce all the irregularity that
astronomers
are now aware of, the universe must have possessed the seeds of
such
unevenness even at the very earliest stages of its development.
But the
big bang theory did not seem to take these features into account.
Up until a couple of years ago some scientists were even
prepared to
reject the theory unless it could explain the ragged dispersal of
matter.
However, in the spring of 1992 doubts were apparently
dispelled. Data
carefully collected from a satellite called the Cosmic
Background
Explorer (COBE) appeared to show that as early as 300,000
years after
the big bang, when the universe was still in its infancy, the
radiation out
of which later forms of matter evolved had already assumed a
distinc-
tively rippled character. The primordial wrinkles were probably
the
"seeds" ofthe uneven universe we have today. So the big bang
theory
seems safe-at least for now.l
Nevertheless, some scientists persist in their "unbelief." Though
admittedly without any evidence. they conjecture thar we may
live in
an "oscillating universe." Perhaps over a period of many
billions of
years the universe recurrently contracts and expands
unceasingly in an
infinitely prolonged series of "big bangs" and "big crunches."
This
provocative hypothesis appeals especially to some scientists
who find
the idea of divine creation difficult to swallow.
Other scientists, however, have replied that an infìnite series of
worlds
is still a problematic notion in view of the second law of
thermodynam-
ics. This remorseless law of physics maintains that the available
energy
in the universe is gradually winding down irreversibly, like a
clock
whose spring-tension eventually gives out altogether. So even if
there
have been many oscillations (big bangs followed by big
crunches) the
cosmos nonetheless would be slowly running out of available
energy
over the long run. Hence the law of thermodynamic
ineversibility
requires that the whole series of hypothetical universes must
itself have
had a singular beginning, perhaps many oscillations ago.
So the dispute continues about whether the universe ever had a
Was the Universe Created? 105
clearly definable beginning. some scientists are not sure that the
same
laws of thermodynamics operative in our world today would be
applic-
able in alternative episodes of an oscillating universe. Science
has not
to everyone's satisfaction definitively ruled out the possibility
that the
cosmos is eternal. There is no concrete evidence to support the
idea that
there have been an infinite number of "big bangs," but there is
no way
to disprove it either.
In the discussion below, a question arises as to whether it is
pure sci-
ence, or rather some very non-scientific "beliefs," that have led
a few
skeptical cosmologists to cling so tenaciously to such ideas as
an
oscillating universe and other equally imaginative cosmological
theo-
ries when there is no empirical evidence that could confirm or
falsify
them. Perhaps one motive for flirting with the extravagant idea
of mul-
tiple universes is that it helps to save the idea that the origin of
life
could have been a purely random event, and therefore one that
required
¡o special divine intervention.a For in the absence of a creator,
an infi-
nitely prolonged series or proliferation of "worlds" would give
life a
larger window of opportunity to come about by chance alone.
After all,
the probability of life's originating purely by chance in a single
uni-
verse might be very small. But if there were an infinite number
of big
bangs and big squeezes, then life has an indefinitely wider
range of oc-
casions to pop up accidentally during one, or perhaps even
several, of
these runs.5
Science today has shown that innumerable physical
coincidences
have to come together if life is to be possible at all. But if there
were an
infinite number of attempts at universes, sooner or later one of
them is
bound to succeed in having those special conditions that give
rise to
life. In such a case our own apparently improbable existence
would not
be so unexpected after all. In fact. it would be an almost
inevitable
eventual outcome of a gigantic cosmic lottery involving an
infinite
series of mostly lifeless and mindless worlds.
Nevertheless, until actual evidence of such innumerable worlds
comes forth, it seems more appropriate in our present discussion
that we
look at the relationship of the religious doctrine of creation to
the world
of current scientific consensus. As it turns out, the cosmos
articulated in
terms of the widely accepted big bang theory of cosmic origins
is fasci-
nating enough, and firmly enough established, to stir some
interesting,
though quite diverse, reactions. Does big bang cosmology
provide a suf-
ficiently substantive basis for a scientific certification ofthe
theology of
creation? Here are some possible answers.
106 Science and Religion
I. Conflict
At first sight, nothing in modern science would seem to be more
sup-
portive of the idea of a Creator God, and therefore of religion's
plausi-
bility, than the big bang theory of cosmic origins. In the
Revised
Standard Version, the Bible starts out with the words: "In the
begin-
ning, God created the heavens and the earlh." And now, after
many cen-
turies in which philosophers and scientists have assumed that
matter is
eternal, it turns out that science itself is finally leaning toward
the
notion that the universe is temporally finite. Could we find a
more
obvious basis for reuniting theology and science than in the idea
that
the universe had a beginning? For how better than through the
doctrine
of creation-and the idea of a Creator God-could we explain how
the
cosmos came into existence so abruptly out of apparent
nothingness?
A great deal of ink has been spilled in attempts to show that big
bang
physics has made the theological idea of creation intellectually
respect-
able once again. Although fundamentalists reject big bang
astrophysics
because it makes the universe too old to fit into the narrow time
period
(roughly 10,000 years) allowed by their biblical literalism,
some orher
conservative christians like Norman Geisler and Kerby
Anderson are
now claiming that "the big bang theory of the origin of the
universe has
resurrected the possibility of a creationist view of origins in
astron-
omy."6 The book of Genesis has apparently found conclusive
support in
the new cosmology.
As you might have anticipated, however, we scientific skeptics
will
need much more than big bang physics to lead us back to
religious
faith. For it is not at all self-evident thatjusr because the
universe had a
beginning it also had to have a Creator. Quantum physics in fact
allows
for the possibility that the universe came inro being out of
nothing.The
cosmos may have had a beginning, but it could have burst into
exis-
tence spontaneously, without any cause.
The scientific basis for this admittedly counter-intuitive
hypothesis
is the following. At one time, according to big bang theory and
quan-
tum physics, the universe was about the size of a subatomic
particle,
and so we can assume that it behaved the way such particles do.
But ac-
cording to quantum theory the appearance of such particles does
not
need to have any antecedent determining cause. The so-called
..virtual"
particles of microphysics simply pass in and out of existence-
sponta-
neously. V/hy then couldn't the primitive universe, in its
subatomic
Was the (Jniverse Created? 107
dimensions, also have come into existence in the same way, that
is'
without any cause whatsoever? Douglas Lackey explains:
...the big bang might t uu" no cause. How then did it happen?
One expla-
sñãälst partirtes, tttis oscillation between energy levels may
cause the
energy to drop to zero, at which point the particle ceases to
exist.
Conversely, the oscillation can raise a particle from zero to
some finite ;
level; that is, it brings a particle into existence. Such particles,
usually
called virtual particles, are literally coming into existence from
a vacu-
um. that is,from nothing....one could explain the Big Bang as a
fluctua-
tion in a vacuum, like the fluctuations that bring virtual
particles into
existence. But if the fluctuations are spontaneous, then the
creation of
the universe from a vacuum is also spontaneous't
Moreover, the renowned astrophysicist Stephen Hawking
recently
gave our skepticism a significant boost by theorizing that,
though the
universe is not eternal. it still might not have had a clear
temporal
beginning. This is hard for common sense to grasp, but since
modern
physics emphasizes the close connection between time and
space,
iTawking .ubrniß that it is possible to conceive of time as
emerging
only gradually out of space. and so there may well have been no
abrupt,
cteárty defined first moment, and therefore no first cause either.
He
writes:
The idea that space and time may form a closed surface without
bound-
ary...has profound implications for the role of God in the affairs
of the
universe. With the success of scientific theories in describing
events,
most people have come to believe that God allows the universe
to
evolve according to a set of laws and dOes not intervene in the
universe
to break these laws. However, the laws do not tell us what the
universe
should have looked like when it started-it would still be up to
God to
wind up the clockwork and choose how to start it off. so long as
the uni-
verse hãs a beginning, we could suppose it had a creator. But if
the uni-
verse is completely self-contained. having no boundary or edge'
it
would have neither beginning nor end: it would simply be. what
place
then for a creator?8
So the new physics does not have to lead to theology after all.
Some
of us who are skeptical about religious matters have to admit.
however,
that recent developments in astrophysics (unlike those in
evolutionary
nation provided by quantum theory depends on the fact that in
quantum
physici 1¡e gqgleylevels-olpaftl5 and systems can never be
pTgcise.ly
the
108 Science andReligion
biology) do not necessarily conflict with religion. Taken at face
value,
they might even seem to support it. Robert Jastrow. for
example, reads
"theological implications" out of (or into?) big bang cosmology.
A pro-
fessed agnostic, Jastrow nevertheless states in his popular book
God
and the Astronomers that the big bang theory appears to support
the
biblical doctrine of creation. Many astronomers, he says, would
have
preferred that the universe be eternal. Then there would be no
need to
posit a Creator who began the whole business. So to scientific
skeptics
the big bang theory came as a very unpleasant surprise. Jastrow
thinks
that theologians will all be delighted that science has now
seemingly
demonstrated that the universe had a beginning, while the
agnostic
astronomers will be very agitated:
At this moment [as a result of big bang cosmology] it seems as
though
science will never be able to raise the curtain on the mystery of
creation.
For the scientist who has lived by his faith in the power of
reason. the
story ends like a bad dream. He has scaled the mountains of
ignorance,
he is about to conquer the highest peak; as he pulls himselfover
the final
rock, he is greeted by a band oftheologians who have been
sitting there
for centuries.e
Not all of us, however, are happy with Jastrow's ironic
interpretation
of big bang physics. We might not go so far as to repeat Fred
Hoyle's
caustic comment that big bang cosmology was, after all, the
brainchild
of the Belgian astronomer Georges Lemaitre who was also a
Roman
Catholic priest. But we note with some disappointment that
Arno
Penzias, co-discoverer of the "smoking gun" cosmic background
radia-
tion, and an orthodox Jew, stated in a recent inferview in the
New York
Times: "The anomaly of the existence of the universe is
abhorrent to
physicists, and I can understand why: the universe should not
have hap-
pened. But it did."'o And we are puzzled that in the spring of
1992,
Professor George Smoot, also a self-styled skeptic who directed
the
COBE project. could not resist alluding to what he thought
might be
"theological implications" in the new supporting evidence from
the
COBE project for the big bang theory.¡l
Most of us skeptics are suspicious of dalliances with theology
like
those of Jastrow, Penzias and Smoot. It is simply inappropriate
to draw
theological conclusions from science. We shiver whenever we
think of
the long-term consequences of any religious sanctioning of
scientific
ideas. And although it may seem for the moment that big bang
physics is
smoothing over some of the friction between science and
religion, we
Was the (Jniverse Created? 109
know that science will continue to change. And if the big bang
theory is
eventually discarded as premature or inaccurate, then on what
ground
witl those theologians stand who now see it as a vindication of
theism?
II. Contrast
we completely agree with our skeptical adversaries that big
bang
physics prwides no new ammunition for theology. The
temptation to
i.uO tn"åtogical implications directly out of exciting new
cosmological
discoveries is powerful, but for the sake of theology's well-
being it
should be resisted at all costs. unfortunately, the conflation of
creation
theology with big bang physics has proved to be irresistible
even for
some of the most prominent religious officials. For instance'
in'195'1
Pope Pius XII suggèsted to an audience of scientists that the big
bang the-
ory no* provides solid suppon for the religious doctrine of
creation.
Such an uncritical endorsement-one that embarrassed even
Lemaitre-
- fully deserved the sarcastic remark of astronomer George
camow that
the papal stamp of approval now demonstrates the theory's "un-
questionable truth'"r'
our own strategy is to differentiate the theology of creation so
sharply from scientihc cosmology that there will be no
opportunity for
the twô to clash. Our intent, as always, is to head off any
potential con-
flicts between science and theology. We have so much respect
for both
disciplines that we don't want them to compromise their
integrity
through superficial alliances, even if big bang theory seems to
have
*on th" Oay in science. We wish to protect for all future
generations of
believers the durability of our classic religious teaching about
creation''
Consequently, we are not interested in fastening the plausibility
of the
u"n"rubl" doctrine of creation to anything so unsteady aS the
ephemer-
al ideas of contemPorarY PhYsics.
In other words, we shall not allow ourselves to be seduced by
big
bang cosmology, even if the latter has a primafacie affinity with
bibli-
cal accounts of the world's beginnings. Theology and
astrophysics are
talking about two entirely different sets of truths, and the
plausibility of
the doitrine of creation depends in no way on the scientific
vindication
of big bang theory. If we learned tomorrow that the theory is
scientifi-
cally mistaken, we would not in the least be disturbed'
The reason for our reserve should be obvious to the reader by
now. /t
is simply not the business of science to deal with ultimate
questions'
Hence, úig Uung physics can tell us nothing about what
"creation" real-
ll0 Science and Religion
ly means in its religious depth. At the same time, it is not the
task of
religious accounts ofcreation to give us any details about the
physical
origins of the universê either. The stories in Genesis have
nothing
whatsoever to teach science about cosmic beginnings. And
although
big bang physics may be an interesting and scientifically
fruitful way
of depicting the origins of the material universe. this is a far cry
from
telling us anything about the real meaning of creation.
What then is the doctrine of creation all abour? Our answer, pur
in its
briefest terms, is that creation is not so much about
chronological
beginnings as about the world's ontological dependency on God.
Ideas
about the big bang provide us with provocative scientific
rheories con-
cerning the birth of the present universe. but the doctrine of
creation is
about something much more momentous: why is there anything
at all
rather than nothing? Cosmologists look for a first cause, and we
do not
object to that; but creation theology is not so much concerned
about
temporal beginnings as about awakening us to the complete
giftedness
of all things, regardless of how (or even whether) they "began."
Its pur-
pose is to invite us to assume that most fundamentally religious
of pos-
tures, namely, gratitude for the very existence of the universe.
Thus, nothing that astrophysics can tell us about the early
universe
will make its existence any more remarkable than it already is
to a
secure religious faith. Talking about cosmic beginnings does not
bring
us any closer to God, for the crucial point is not chronological
origins
but the naked existence of the cosmos. Even if science taught us
every-
thing there is to k¡ow about cosmic beginnings. we would still
not have
a "solution" to the encompassing mystery of the world's being.
Moreover, it is not theologically essential that the universe even
have had a beginning in time. For, whether it began in time or
not, it
would still require a transcendent grounding, religiously
speaking, in
order to sustain it in existence. Hawking completely misses this
point
in his cavalier suggestion that since the universe may have had
no clear
beginning, it therefore had no need for a Creator. The theology
of cre-
ation, as no less an authority than Thomas Aquinas insinuated,
is not
necessarily dependent on the supposition that the universe had a
tem-
poral beginning. Even an eternal universe could be the
expression of
the primordial love that we call God. By linking the idea of
creation so
closely to temporal beginnings Hawking duplicates the
conflationist
superficiality of fundamentalist crearionism and Enlightenmenr
physi-
co-theology, both of which try to make science do the job of
religion,
and vice versa. We repeat: creation is not about chronological
be-
Was the (Jniverse Created? 111
ginningssomuchasitisabouttheworld,sbeinggroundedcontinuous-
ly in the graciousness of God.
Theológian Keith ward clearly summarizes our position on
this
point:
...it is wholly inadequate to think of God having created the
universe
at
some remote point of time-say, at the Big Bang-so that now the
uni-
verse goes on existing by its own power' This popular
misconception'
that "ihe creation" is tfté ¡rst moment of the spacetime universe'
and
that the universe continues by its own inherent power' wholly
miscon-
Strueseveryclassicaltheistictradition.Itisirrelevanttoadoctrineof
creation ex nihilo whether the universe began or not; that the
universe
began was usually accepted because of a particular reading
of Genesis l '
Thedoctrineofcreationexnihilosimplymaintainsthatthereis.nothin
g
otherlhanGodfromwhichtheuniverseismade,andthattheuniverseis
otherthanGodandwhollydependentuponGodforitsexistence''3
- It follows also, therefore, that speculations
from quantum theory
about the spontaneous origins of the universe have no
implications
for
the religious notion of creation either. Lackey's suggestion
that the infi-
nitely Jmall early universe could have erupted randomly out
of the
..nothingness,, of a Vacuum matrix is not at all relevant to the
issue of
creation.Thereallyinterestingquestionis:whyaretherebeingsatall'
includingvacuummatrices(whichLackeysuperficiallyanderro-
neously equates with "nothing")?
Incidentally, another word-trick skeptics sometimes use is
to identi-
fyaspure..nothingness''thehypotheticalinitial..perfectsymmetry''i
n
*r,i.ú opposite charges of primordial physical enriries originally
can-
celed each other out-mathematically and energetically.
Then when this
primordialstateofZerototalenergywas..broken,''thecosmosissaid
to have arisen out of "nothing," therefore requiring no creator.
It all just
happened spontaneously, without any cause'
Ho*"u",'inourviewitisinnosensejustifiablelogicallyoronto-
logicallytoidentifyaquantumVacuumortheoriginalsymmetryof
mathematic al ,,zerô,, with a
..nothingness" in any sense remotely
resemblingÏheexnihiloofcreationtheology.Nomatterhowmathe-
marically ithereal or physically subtle the initial cosmic
conditions
may seem to have been, metaphysically speaking they
still enjoy some
moãe of being. And it is the sheer being of things, regardless of
how
mathematicalequationsrepresentthem'thatevokesthetruesenseof
religious wonder.
Il2 Science and Religion
In sum. no matter what the specific features of cosmic origins
look
like to physics, science.is not equipped to say anything about
the deeper
question as to why there is anything at all, or what the ultimate
meaning
of the universe might be. These fundamentally religious
questions are
not the same as the question of what caused the universe to
appear out of
the quantum vacuum or a perfect symmetry. Even if the
universe did
emerge "spontaneously" and without any determinable physical
"cause," the relevant question has to do with the metaphysical
fact of the
world's "being," not with the interesting sequence of physical
events
that might or might not have triggered it. Tracing events back
either to a
first efficient cause, to a vacuum matrix, or to a spontaneously
broken
symmetry may be scientifically interesting, but it is by no
means the
same as asking about the ultimate ground of the world's being.
Here we should point out also that Robert Jastrow, who regards
big
bang theory as a possible victory for the "theologians," shares
with bib-
lical literalists the questionable assumption that creation has
more to do
with beginnings than with ontological dependency. Missing
from the
"band of theologians" that Jastrow expects to be waiting on the
other
side of big bang mountain are those (including Thomas
Aquinas) who
maintain that even an eternally existing universe would not be
incom-
patible with its being grounded in a well-spring of divine
creativity.
Like many other scientific skeptics Jastrow simply takes for
granted
that all theologians are likely to be biblical literalists and that
"cre-
ation" is fundamentally about chronological "beginnings." It is
this
confusion that we wish to dispel.
In fact, Jastrow is implicitly approving the very same, though
highly
questionable, theological method that conservative religious
writers like
Geisler and Anderson employ.'' It is that of forging a
conflationist con-
federacy between science and religion on the basis of what is
currently
considered the best of science. The problem with this kind of
alliance, as
we have repeatedly noted, is that it will fall to pieces as soon as
the pre-
vailing scientific theory itself proves defective or in need of
revision.
We should recall always that good science leaves its theories
open to fal-
sification. So any theological method that bases its conclusions
directly
on falsifiable scientific consensus, no matter how secure this
consensus
may seem to be at present, holds little promise for future
relations
between science and religion. Even though big bang theory
appears to
have ousted all conceivable cosmological alternatives, there is
no guar-
antee that it will hold up indefinitely. A permanently sound
method of
relating cosmology to theology has to dig deep beneath big bang
theory
Was the (Jniverse Created? 113
and into the perennial truths of metaphysics for more lasting
founda-
tions.
Wecandrivehomethispointbylookingbrieflyatwhatinmodern
times has been the fate of "physico-theology." This is a
designation
given by Immanuel Kant to those forms of theology that based
them-
selves squarely on physics' In the early modern period' for
example'
Newton'; ideas fostered physico-theology by making the world-
machine the primary reason for invoking the idea of God as its
divine
mechanic. Prominent theologians followed Newton, reasoning
that
the-
ism had at last hit upon a solid intellectual foundation in the
certainties
of physics. The "book of nature" even seemed to be a more
certain
road
to God than the Bible itself'
A bit later, howeve¡ materialist thinkers like Diderot
convincingly
argued that physics required nothing other than natural
principles
to
"*ptuin
itseli. It could provide its own grounding. Having no further
,.oi. ro play, therefore. theology became an intellectual orphan.
It is no
'
"*ugg.ìuti,on
to say that theology's taking physics rather than religious
"*pãIi"n""
as its loundation helped lead eventually to the spread of
iniellectual atheism and to the comparatively low standing the
disci-
pline of theology still has in our modern universities. More than
once
conflation has proven to be theologically disastrous'15
Today,whilemostacademictheologianshavenouseforphysico-
theology, ironically some scientists are attempting to revive it'
One
"*u*piã
is the physicist Paul Davies, who constructs his ideas about
God iuite direcily out of the discoveries of physics.'ó
Though Davies
has litìle use for religious ideas of God, he thinks good science
leads
us
to the notion of a ðreating and designing deity' A more recent'
and
muchmorebizarre,"*u*pl"ofphysico-theologyisthatprovidedby
the respecred Tulane physicist Frank Tipler. In his latest book
Î/ze
physici of Immortaliry he argues with utter seriousness that
theology is
now a branch of physics. Religion's promises about eternal
survival
of
death,heclaims,.unno*besubstantiatedmuchmorecompellinglyby
physicsthanbytheologyalone.Scienceitselfcannowgiveusmathe-
máticat certainty that we will all be raised from the dead to live
forever'
And not only that: it can also lead us to absolute certainty about
the
existenceofGod.Inthelightofphysicsthereisnomoreneedforreve-
lation and faith.''
Manytheologians'however,wouldrespondtosucheffortsby
emphasizingthatany..God''arrivedatthroughsciencealonewouldbe
only un absiraction, not the God of Moses or Jesus or
Muhammad.
To
1t4 Science and Religion
read the God of religion directly out of the theories of
physicists will
eventually lead to conflict rather than cooperation between
science and
religion. We must seek a more durable theological approach
than that
of conflation.
III. Contact
Once again the contrast approach provides a clear alternative to
the
unfortunate commingling of religious and scientific ideas that
generates
conflict. It rightly resists the strong temptation to identify the
big bang
with divine creation. However, its severe compartmentalizing of
cos-
mology on the one hand, and the religious teaching about
creation on the
other, unnecessarily suppresses the prospect of fruitful
dialogue. We
would argue. as usual, that cosmology always has theological
implica-
tions. If the latter are not made explicit they nevertheless
remain implic-
itly effective in shaping our religious ideas. It seems more
honest, there-
fore, to expose them to the light of day. We need to be very
cautious in
doing so, of course, since science is always changing (as is
religion too
in its own way). But current scientific theory is never
completely irrele-
vant to theology. So we should at least look for points of
"contact"
between big bang cosmology and creation theology.
We do not want to make the same mistakes theology made in the
past
by basing itself directly on physics. Physico-theology, we agree,
has
apparently left theology somewhat stranded in the modern
intellectual
world. But immunizing theology completely against what is
going on in
science is no less fatal to its intellectual integrity. Theology
cannot help
but think about God in terms of some cosmology. And today big
bang
theory, along with all the other things that relativity and
quantum
physics are implying about our world, must be taken into
account when
theologians talk about God's relation to the world. Although we
do not
wish to base our creation faith directly on scientific ideas, our
reserve
does not mean that big bang cosmology is theologically
irrelevant.
One of the immediate consequences of big bang theory for
theology
is that at the very least it forces us to take Íhe cosmos into
account once
again in our religious thought. It might seem strange that we
make an
issue of this obvious point. but the sad fact is that the natural
world has
not been a major concern of modern theology. Even though our
creed
emphasizes that God is the "Creator of the heavens and the
earth," our
religious life and practice seem lately to have glossed over this
teach-
ing.'' Theology has been so preoccupied with questions about
human
Was the (Jniverse Created? 115
existence that it has often left out the fact of our being linked to
a much
larger universe.
This is nor completely surprising, for in modern thought since
Immanuel Kant (1724-1804) the universe as an object of
theological
and philosophical interest had already faded into the
background. As far
as Kant was concerned, the universe existed only as a kind of
construct
of the human mind. It was a background notion, not a real,
conerete set
of interconnected finite things that could be made the object of
formal
study itself. Thus for the last couple of centuries, especially as
the result
of fantian influence, the universe was virtually lost to
philosophy and
theology, both of which became onesidedly subjective and
anthropocen-
tric. Itii especially out of Kantian ideas, we must also note' that
much of
the contrasiers'approach to theology was born and nurtured.
'
However, as stanley Jaki astutely claims, recent scientific
cosmology
surting with Einstein has "restored to the universe that
intellectual
."rp".tubility which Kant had denied to it."'n we can now study
the uni-
-veÀe more direcrly, rather than making it only the backdrop of
more
specific areas of inquiry. The new cosmology, therefore, is
theologically
cànsequential simply by virtue of the fact that it brings the
universe to
the fore once again.
The universe implied by Einstein's theory of general relativity
and
big bang cosmology is no longerjust a vague background for our
scien-
tiñc oi theological pursuits, but instead-and notwithstanding its
unfathomable enormily-a bounded and limited set of things. It is
nei-
ther eternal nor necessary, but radically finite. But if the
universe is
finite, this can only mean, as far as we are concerned, that it is
contin--
gent. Andif it is contingent, this at least opens up the possibility
that we
lay need to go beyond the world itself in order to explain why it
does
exist at all. Let us unfold this idea a bit further'
Tosaythatsomethingiscontingentmeansthatthereisnonecessity
tbr its having come into existence at all-or for its being the way
it is-
as there *uy huu" been if matter were eternal or infinite' this
particular
universe, even science now seems to impty, need not be here.
But since
it is here, the question legitimately arises as fo why it exists if
it did not
have to. And once we have asked this question we have already
brought
science into close contact with theology'
We can no longer say, as the contrasters do, that big bang
cosmology
is theologically unimportant. For the new scientific vision of
the cos-
moscompelsustou'kinudramaticallynewwaytheoldestquestionof
all: why does the universe exist anyway? lt is no longer as easy
as it
116 Science andReligion
was earlier in modern intellectual history for cosmologists to
separate
"how" questions from "why" questions, as the contrasters would
prefer
that they do. And once the "why" questions arise, there is no
good rea-
son to exclude theology any longer from intimate conversation
with
science.
After all, the theology of creation understandably maintains that
rhe-
ism provides the most straightforward and uncomplicated
answer to the
question: "why does the universe exist at all when there is no
necessity
that it do so?" And even though the question as to why the
world exists
arises quite independently of big bang cosmology and general
relativi-
ty, the fact that today it arises so explicitly our of scientific
cosmology
inevitably places the latter in a context where close encounter
with the-
ology seems wholly appropriate.
Therefore, although we do not run to embrace the extravagant
pro-
posals by Robert Jasrrow and other scientists that big bang
cosmology
may have finally bridged rhe worlds of the Bible and science,
neirher
do we dismiss their overtures as though they were completely
point-
less. For beneath their efforts to connect the worlds of science
and reli-
gion we detect strains of an irrepressible sense of awe at the
sheer fac-
ticity or "thatness" of the universe. Even Steven Hawking seems
to hint
at times at the need for some metaphysical principle that would
"breathe fire" into the abstract mathematics of physics and make
this
into an actual, concrete universe.?') It is not difficult to pick up
the theo-
logical concern in some of his writings, even when he p."s"nts
himself
as a skeptic.
wonder at the f'act that the universe exists at all has been given
a
powerful boost by current cosmology. And since creation faith
is insep-
arable from this same sense of wonder at the mystery of being,
theolo-
gians cannot be indifferent to the new scientific developments.
while
remaining careful about easy liaisons, we can nonetheless be
excited
that science itself is causing a new wave of what paul rillich
called
"ontological shock," the feeling of being awestruck by the sheer
exis-
tence of that which need not have come into existence at all.?'
And there are still other interesting consequences of theology's
con-
tact with big bang theory. For example, to a degree that
previous theol-
ogy could not have noticed so clearly, the new cosmology
presents us
with a world still in the making. put otherwise, the creation of
rhe cos-
mos appears far from finished. Especially as a result of its
encounter
with evolutionary science, but now also with big bang
cosmology, the-
ology today has developed a much deeper sense than ever before
that
Was the Universe Created? ll7
creation is far from being a finished product. The universe still
surges
toward the engendering of ever more novelty and diversity; and
we
humans are caught up in this ongoing creation (though
unfortunately
our species also seems intent upon wiping out much of the
cosmic
beauty that has preceded us in evolution).
When combined with biological notions of evolution, big bang
cos-
mology helps us realize that creation is perpetually new every
day. The
idea that "creation" is only an originating moment confined to
the
remote past detracts from the full religious meaning of the term.
Jesuit
paleontologist Teilhard de Chardin, for example, rejects such a
thought
as "unbearable":
The fact is that creation has never stopped. The creative act is
one huge
continual gesture, drawn out over the totality of time. It is still
going on;
and incessantly even if imperceptibly. the world is constantly
emerging
a little farther above nothingness.2?
This admittedly lyrical declaration sums up the sentiments of a
growing number of religious thinkers who have taken seriously
the
idea of cosmic expansion and evolution beginning with the big
bang. It
cannot be a matter of indifference to theologians that the
universe has
probably not existed forever and that it is therefore still in the
process
of becoming something quite other than what it has been. The
big bang,
even according to scientists, is not something that is over and
done
with. /¡ is still happening. This brings the fact of creation much
more
intimately into the immediate present, and it opens up the future
before
us in a restorative manner.
The event of divine creation is going on within us, beneath us,
behind
us. and ahead of us. We agree with the contrasters that locating
God's
creativity only in the past easily leads straight to deism-and
eventually
to atheism. But a theology of "contact" is still excited about a
cosmos
that probably began in a singularity, for such an origin helps to
dispel the
idea of a static, eternal and necessary universe and replaces it
with an
exciting unfinished world-in-process. It does make a difference
theolog-
ically if the universe had a beginning, for such a universe seems
much
more open to new creation than one that is infinitely old.
Consequently, the idea ofa big bang rules out any "eternal
return of
the same." This is the honifying notion (articulated especially
by
Friedrich Nietzsche, 1844-1900) that if matter is eternal and
unorigi-
nated, everything must periodically be reconstituted in precisely
the
same way, so that there can never be a completely open future.
118 Science and Religion
However, if the universe has a beginning, or at least a finite
past, there
is no possibility of eternal recurrence. Nature is open to
continually
surprising developments in the indeterminate future. According
to big
bang cosmology, with its implied notion of time's
irreversibility, every
occurrence is unrepeated and unrepeatable, and so there is
always an
opening for what our faith looks forward to as a "New
Creation." Our
hope in the promise of New Creation clearly meshes much more
readi-
ly with a big bang universe than it ever could with the eternal
cosmocof
the ancient philosophers or Nietzsche. Many of us would be
thoroughly
disappointed, we must admit, if science eventually forced us to
aban-
don the idea of a finite and unfinished universe. For that reason
we can-
not help but be excited by big bang cosmology.',
Finally, we cannot avoid the observation that the scientific
quest for
beginnings, so abundantly evident in recent cosmology, is at
some deep
level of human existence inseparable from the nearly universar
religious
search for origins. As much as we might appreciate the
contrasters' dis-
tinctions between creation theology and big bang theory, our
indomitably
religious concern for the primordial cannot be completely
disentangled
from the scientific quest for cosmic origins. without collapsing
one inro
the other, we would suggest that much of the energy motivating
science's
look backward into our ultimate cosmic roots stems from the
ineradica-
bly mythic orientation of human consciousness.
The scientific sense of "wonder" about cosmic origins is already
incipiently religious, and we should be honest enough to admit
it. Even
though big bang theory is logically and rheologically
distinguishable
from the religious quest for the source of our being, the two are
existen-
tially inseparable. Though they diverge in rhe order of thought,
they
both flow concretely from a common human concern to discover
our
roots. We humans are forever haunted by origins.
IV. Confirmation
As you might expect, we shall advance the suggestion here that
cre-
ation faith is not only consistent with, but also inherently
supportive of,
science. Scientists are not always aware of how significantly the
reli-
gious doctrine of creation has assisred historically and logically
in the
development of their own discipline. But although we cannot be
certain
of it, a truly empirical method of doing science might never
even have
come about outside of a cultural and historical context that had
been
Was the (Jniverse Created? 119
thoroughly imbued with the idea that the world is a contingent
creation
of God.
To be more specific, the theological notion that the world was
creat-
ed_andisthereforeneithernecessarynoreternal-givesaStatureto
empirical science that other ways of looking at the world do
not. To
unáerstand this point imagine, as some philosophers have
actually
be-
lieved to be the case, that the universe exists eternally and
necessarily.
That is, suppose that the state of the natural world /ras to be
just the way it
is and
"ould
not have been different. Such universal necessity would in
turnimplythateveryparticularthingintheuniverseisalsonecessarily
the way ii is an¿ could not have been otherwise. But if this were
the kind
of universe we lived in, then empirical science would be
essentially
irrel-
evant,foreveryfeaturcoftheuniversecouldintheorybededucedfrorn
necessary first principles. Observation might be of some
practical
value
in the short term, buiit would be cognitionally vacuous. For in
principle
at least we could logically and deductively reason to the nature
of
every
,aspect of the cosmos merely on the basis of an eternal
cosmic inevitabili-
-
,y. Th.." would be no need for empirical method, other than
just to antic-
ipateorconfirmwhatwecouldcometoknowthroughreasonalone.We
would not have to examine the world's particulars inductively,
the way
science does, since we could arrive at an adequate
understanding
of
everything on the basis of its relation to the overall necessity
built into
nature. In other words, there would be no need to look at the
world to see
whatitisactuallylike.Sciencewouldbefinallysuperfluous.
creation theology, however, implies that the actually existing
uni-
verse is not n"""rrãry. [t need not have existed at all. and it
need not
have turned out exactly the way it has. Since its reality and its
nature
originate in the free deóision of the Creator, we cannot come
to know it
thrãugh pure deduction, as Greek philosophy allowed. Creation
faith'
thereflre, implicitly propels us on a journey of discovery to find
out
b),,
observation*trat tt "
wórld is like. Since it expels rigid necessity from
our view of the universe, creation theology opens us up to the
possibil-
ityofbeingsurprisedbytheactualfacts.Itisespeciallyinanin-
tálectual and cultural -ili"u molded by the creation theology of
the
God-religions that the empirical imperative of science. the
injunction
to attend to what *" u"tuuily experience, is explicitly
confirmed.2o
208 Science and Religion
The Cosmic Adventure (New York: Paulist Press, 1984), andThe
Promise of
Nature (New York: Paulist Press, 1993).
14. See L. Charles Birch, Nature and God (Philadelphia:
Wesrminster
Press, 1965), p. 103.
15. The recent sciences of chaos and complexity, which will be
discussed
Iater, also raise serious questions about the exclusive role
ofselection in evolu-
tion's creativity.
16. Gerd Theissen, Bíblical Faith: An Evolutionary Approach.
trans. by
John Bowden (Philadelphia: Fortress Press, 1985). A similar
proposal is gi/en
by John Bowker in his book The Sense of God (Oxford: Oxford
University
Press, 1978), p. 151.
17. For a development of these ideas see John F. Haught, The
Cosmic
Adventure.
18. These ideas are elucidated especially by what is called
"process theolo-
gy." See John B. Cobb, Jr. and David Ray Griffin, Process
Theology: An
Introductory Expos ition (Philadelphia: Westminster Press, I
976).
19. See, for example, Ernst Benz, Evolution and Christian Hope
(Garden
City, N.Y.: Doubleday, 1966).
20. See Karl Rahner, 5.J., Hominization,traîs. by WJ. O'Hara
(New York:
Herder & Herder, 1965).
4.Is Life Reducible to Chemistry?
l. Francis Crick,The Astonishing Hypothesis: The Scientific
Searchfor
the Soul (New York: Charles Scribner's Sons, 1994), p. 3.
2. Ibid., p.257.
3. E. F. Schumacher, A Guide for the Perplexed (New York:
Harper
Colophon Books, 1978).
4. Ken Wilber, Eye to Eye: The Quest for a New Paradigm
(Garden City:
Doubleday Anchor Books, 1983), p. 24.
5. Crick, p. 6.
6. For a purely "materialisf' account of life see Jacques Monod,
Chance
and Necessiry, ffans. by Austryn Vy'ainhouse (New York:
Vintage Books,
1972); and, in addition to Crick's work, for an equally
marerialisr auempr to
explain "mind," see Daniel C. Dennett, Consciousness
Explained (New York:
Little, Brown, 1991).
7. See Ian Barbour, Religion in an Age of Science (New York:
Harper &
Roq 1990), p. 4. Barbour makes a similar distinction between
methodological
and metaphysical reductionism.
8. Crick, pp. 8-9.
9. It should be pointed out, however, that these three giants still
remained
theists themselves, and Newton curiously continued to dabble in
occult sub-
Notes 209
jects to the end ofhis life, fashioning in the process his own
peculiar brand of
theology.
10. Monod, p.123.
ll. Francis H. c- crick, of Morecures and Men (Seattre:
university of
Washington Press, 1966), p. 10.
12. For a summary of the research see, for example, Jon
Frankrin, Molecures
of the Mind: The Brave New science of Molecular psychology
(New york:
Atheneum, 1987).
13. Dennett, p. 33.
14. E. o. wilson, sociobiology: The New synthesis (cambridge:
Harva¡d
university Press, 1975). For a critical discussion of wilson's
genetic determin-
ism see Robert wright, Three scientists and rheir Gods (New
york: Times
Books,1988),pp.113-92.
i
15. See E. o. wilson, on Human Naîure (New york: Bantam
Books, 1979),
p.200.
16. Michael Ruse and E. o. wilson, "The Evolution of Ethics,"
in James E.
Huchingson, ed., Religion and the Natural sciences (New york;
Harcoun
_BraceJovanovich, 1993), p. 310.
17. Crick, The Asrcnishing Hypothesís,p.257.
I 8. Schumach er, A Guide for the perplexed, p. lg.
19. Following Ernest Gellner's expression, Huston smith
discusses the
"epistemology of control" in his book Beyond the post-Modern
Mind (New
York: Crossroad, 1982), pp.62-91.
20. Cited by Schumacher, pp. 5-6.
2l- See Michael Polanyi, personar Knowredge (New york Harper
Torchbooks, 1964), and rhe Tacit Dimension (Garden city:
Doubleday Anchor
Books, 1967).
22. see the discussion in Harry prosch, Michael polanyi: A
critical
Exposition (Albany: Srare University of New york press, 19g6),
pp. 124_34.
23. This analogy is suggesred by polanyi in The Tacit
Dimension,pp. 3l-34.
24. See Michael Polanyi, Knowirg and Being, edited by Majorie
Grene
(Chicago: Universiry of Chicago press, 1969), pp.225'-39.
25. John Polkinghorne, The Faith of a physicisr (princeton:
princeton
University Press, 1994), p. 163.
26. Karl Jaspers refers to this as the "axial age" in The origin
and Goal of
History (New Haven: Yale University press, 1953).
5. Was the Universe Created?
l. Peter w. Atkins, creation Revisited (New york: w H. Freeman,
1992).
2. within specific galactic clusters there may be local movement
of bodies
towa¡d each othe¡ but overall the galaxies move away from each
other as space
expands.
210 Science and Religion
3. Nevertheless, the "standard" big bang theory leaves some
important sci-
entific questions unansrvered. These have been addressed by the
so-called
"inflationary" cosmology which posits that most of the physicai
conditions that
define our present were not yet present in the initial .ondition,
of the big bang,
but became fixed only during an accelerated phase transition
(inflation) strortty
(billionths of a second) afrer the big bang.
4. on the other hand, such speculation may just as readily be the
conse-
quence of purely scientific attempts to interpret the equations of
physics, and
we may assume that in most cases there is no ideological
influence at work. '
5. This is rhe view of John R. Gribbin's In the Beginning: Afier
coBE and
Beþre the Big Bang (Boston: Little, Brown, 1993).
6. Norman J. Geisler and J. Kerby Anderson, in Huchingso n,
ed., Rerigion
and the Natural Sciences,p.202.
7. Douglas Lackey, "The Big Bang and the cosmorogical
Argument,,'in
Huchingson, ed., p. 194 (emphasis added).
8. Stephen Hawking, A Brief History of rime. pp. 140-4r. See
arso paul
Davies, The Mind of God: The scientific Basis for a Rational
l4zorld (New york:
Simon & Schuster, 1992), p.66.
9. Robert Jastrow, God and the Astronomers (New york: w.w.
Norton and
Co.), p. l16.
10. Quoted in Stanley L. Jaki, (Jniverse and creed (Milwaukee:
Marquette
University Press, 1992), p.54.
I l. In his recent book, wrinkles in Time,howeve¡ smoot refers
to himself as
a "skeptic" as far as religion is concerned.
12. Timothy Ferns, coming of Age in the Milþ r/ay (New york:
Doubleday,
1988),p.274-
13' Keith ward, "God as a principle of cosmorogical
Expranation," in
Robert Russell, Nancey Murphy and c. J. Isham. editon (Notre
ùame: vatican
observatory and university of Notre Dame press, 1993), pp. z4g-
4g.The cita-
tion from ward is not intended to imply that he himself endorses
the contrast
approach. In fact he seems to fit more comfortably into
the..contact" position.
14. See note #6 above.
15. This is the thesis of Michael J. Buckley, At the origins of
Atheism (New
Haven: Yale university Press, 1987); this is not ro imply,
however, that
Buckley himself subscribes in every respect to the "contrasi'
ápproach, though
it seems at times that he leans in that direction.
16. Paul Davies, God and the New physics (New york Simon &
schuster,
1983); and rhe Mind of God: The scientific Basis for a Rational
world (New
York Simon & Schusrer, 1992).
17. Frank J. Tiplea The physics of Immortaliry (New york
Doubleday,
1994). Since the main purpose of religion was always to satisfy
our craving for
eternal life, Tipler asks, why do we need it any longer if physics
can now give
us mathematical certainty that we will be raised from the dead
to live forever?
Notes 2ll
Using general relativity, quantum cosmology, artificial
intelligence, and a
touch of Teilhard de chardin, he assures us that nature requires
that intelligent
life will survive forever. To those who reply that the sun will
eventually inciner-
ate the earth and its biosphere, Tipler argues that "life" in the
form of artificial
intelligence will inevitably have ventured far beyond our galaxy
long before
our planet disappears. we will have launched tiny self-
replicating forms of
information-processing that will eventually spread intelligent
"life" to safer
regions of the universe. In the end, this intelligent life (which
ripler consistent-
ly defines in terms of informational capacity) will "take
control" of the entire
cosmos.
But suppose we live in a "closed" universe. that is, one destined
for a final
gravitational collapse at immense temperatures. won't the "big
crunch" destroy
life completely? Not at all, Tipler replies. chaos theory now
allows that the uni-
verse will not collapse at the same rate everywhere. So there
will forever be
some variation in temperature among different patches of the
cosmos, and this
differential will provide sufficient energy potential for
indefinitely prolonged
_information-processing.
Billions of years from now there will finally emerge an..Omega
point" com-
prised of such extraordinary calculational competence that it
will be able to
bring us all back from the dead. It will do this through an
..emulation," i.e. a
perfect computational simulation, of the partems that now give
us our identity.
Because each of us is ultimately reducible to bits of data, we
can realistically
expect that the informationally precocious omega-Point will
process us back
from the dead and into etemal life.
How can this happen? Tipler answers that we are now
imprinting sets of
retrievable information about ourselves, however faintly, on a
"light cone" that
will extend indefinitely into the future of the cosmos. omega-
point wilt be able
to read this data and print us out in the flesh once again. Thus.
Omega-point, a
notion Tipler adapts from Teilhard. is very much like what
theology calls
"God," for he "exists necessarily," "loves us," and seeks to save
us from
absolute perishing.
Tipler proclaims all of this while insisting that he is an atheist,
a materialist,
and a reductionist. His thoughts about Omega-God follow he
says, not from
the flimsy reports of religion, but from pure physics. We don't
need, therefore,
to participate any longer in the superfluous religious acts of
prayer and wor-
ship. The existence of "God" and the certainty of eternal life
will be brought
home to us clearly enough if we just follow the equations of
physics. (This noæ
is adapted from t̡e author's review of Tipler's book in
America,yol. 172, No. I
(January, 1995),24-25.
18. Jaki, Universe and Creed,p.27.
19.Ibid.
20. Hawking, A Brief History of Tïme, p. 17 4.
212 Science and Religion
21. Paul rillich. systematic Theotogy, Vor. I (chicago:
university of
Chicago Press, 195 l), p. I 13.
22.Teilhard de chardìn. The prayer of the (Jniverse,(New york:
Harper &
Row. 1968), pp.120-21.
23. See. however, the discussion by c. J. Isham and J. c.
porkinghorne,
"The Debate over rhe Block Universe," in Russell, et al, ed.,
g)rantum
Cosmology and the Laws of Narure,pp. 135-44
24. This point wilr be considerabry amplified in chapter 7 with
its discus-
sion of the new sciences of comprexity and chaos. See Michael
roster. ..r[í
christian Doctrine of creation and the Rise of Modern Natural
science,,, Mind
(1934),446-68.
6. Do We Belong llere?
l. Some physicists even conjecture (perhaps wildry) that the
universe
becomes determinate only when it intersects with observers.
2. See the discussion by Rolston, pp.67_70.
3. This idea is said to have come from the physicist Leon
Lederman.
4- For example, Alan Guth's inflationary cosmologicar
hypothesis, which
seems to settle many of the difficulties with srandard big bang
iheory, is wide_
ly accepred even though, unlike rerativity theory, there is no
úuy to iest it. See
Alan Guth. "Inflationary universe." Encycropecria of
cosmorlgy, edired by
Norriss S. Hetheringron (New yor*: Garrand pubrishing, rnc.,
tg!¡), pp. 301-
22.
5. see especially John D. Barrow and Frank J. Tiprer, The
Anthropic
cosmological Principle (New york: oxford university press,
r9g6).
6. Heinz Pagels. Perfect symmetry (New york: Banram Books,
19g6), pp.
377-78.
7. Perhaps. however. the inflationary hypothesis that came out
of the early
1980's eliminates the need to pack so much into the initial
cosmic conditions.
Many of the remarkable coincidences that the sAp attributes to
initial condi-
tions could have come about by physical necessity during an
..inflationary
epoch" only small fractions of a second after the big bang. See,
for example,
George Smoot, Wrinkles in Time (New york: William Morro* &
Co., Inc.,
1993), pp. 190-91.
8. John Gribbin. In the Beginning: After coBE antr Beþre the
Big Bang
(Boston: Little, Brown. 1993).
9. Smoot. Wrinkles inTime,p. l9l.
10. See the similar point made by Nichoras Lash, ..observation,
Revelation, and the Posterity of Noah," in physics, phitosophy
and rheotogy,
edited by Robert J. Russell, et al (Notre Dame: universiiy of
Notre Dame
Press, 1988), p.211.
11. Gribbin, In the Beginning, pp. 249-53.
Notes 2t3
12. This approach is especially characteristic of some forms of
..existential_
ist" theology, particularly those associated with Rudolf
Bultmann and his fol_
lowers.
13. Moreover, in the final chapter of this book we shall point
out that the
SAP's connecting our existence so crosely to the physicar
cosmos may have
some bearing on the issue of ecology also.
14.The Quickening (Jniverse (New york: St. Martin's press,
l9g7), p. xvii.
15. see Freeman Dyson, Infinite in Ail Directions (New york:
Harper &
Row,1988), p.298.
16. For development of this whiteheadian theme see the author's
earlier
book,The Cosmic Adventure (New york: paulisr press, l9g4).
7. Why Is There Complexity in Nature?
l. Two of the best introductions to "chaos theory" are James
Gleick,
chaos: The Making of a New science (New york: Viking, l9g7)
and stephen
H' Kellert. In the wake of chaos (chicago: university of chicago
press,
'1993). The new science of "complexity" is summarizld in Roge-
r Lewin,
complexity: Life at the Edge of chaos (New york: Macmillan,
r9é2) and M.
Mitchell waldrop, complexity: The Emerging science at the
Edge of order
and Chaos (New York: Simon & Schusrer, 1992).
2. James- P. crutchfield, J. Doyne Farmer, Norman H. packard
and Robert
S. Shaq "chaos," scientific American (December, 19g6), pp. 3g-
49, cited by
Arthur Peacocke, Theology for a scientific Age (cambridge:
sasil Blackwell,
1990),p. a2.
3. see the books by waldrop and Lewin for numerous interviews
with sci-
entists who are now framing their questions in these interesting
ways.
4. Forexamples of this line of thoughr see Lewin, pp. l6Z_6S.
5. See Alfred North whitehead, science and the Modern wortd
(New
York: The Free Press, 1961), p.9a.
6. See John T. Houghton, "A Note on chaotic Dynamics,"
science and
christian Belief, Vol. l, p. 50. However, John polkinghome has
expressed
some doubts about the significance of such quantum effects in
the macro world:
Reason and Realiry (SPCII Trinity press Inrernarional, I 99 I ),
pp. g9_92.
7. The now classic example of such skepticism is Jacques
Monod's book
Chance and Necessity, cited earlier.
8. These ideas, once again, have been articulated most fully and
explicitly
in process theology, but they are quite compatible with othei
forms of reli-
gious reflection as well.
9. John Polkinghome, The Faith of a physici.rr (princeton:
princeron
University Press, 1994), pp. 25-26, 7 5-g7 .
10' Stephen Jay Gould, Ever since Darwin (New york: w. w.
Norton &
company, 1977), p. 12. Recently, Gould has been
acknowledging that natural
1
CSC 262
Programming in C++ II
Sykes
Day 18
22.1 Introduction to the Standard Template Library (STL)
We’ve repeatedly emphasized the importance of software reuse.
Recognizing that many data structures and algorithms are
commonly used, the C++ standard committee added the
Standard Template Library (STL) to the C++ Standard Library.
The STL defines powerful, template-based, reusable
components that implement many common data structures and
algorithms used to process those data structures.
2
22.1 Introduction to the Standard Template Library (STL)
(Cont.)
As you’ll see, the STL was conceived and designed for
performance and flexibility.
This chapter introduces the STL and discusses its three key
components—containers (popular templatized data structures),
iterators and algorithms.
The STL containers are data structures capable of storing
objects of almost any data type (there are some restrictions).
We’ll see that there are three styles of container classes—first-
class containers, adapters and near containers.
3
4
22.1 Introduction to the Standard Template Library (STL)
(Cont.)
STL iterators, which have properties similar to those of
pointers, are used by programs to manipulate the STL-container
elements.
In fact, standard arrays can be manipulated by STL algorithms,
using standard pointers as iterators.
We’ll see that manipulating containers with iterators is
convenient and provides tremendous expressive power when
combined with STL algorithms—in some cases, reducing many
lines of code to a single statement.
There are five categories of iterators, each of which we discuss
in Section 22.1.2 and use throughout this chapter.
5
22.1 Introduction to the Standard Template Library (STL)
(Cont.)
STL algorithms are functions that perform such common data
manipulations as searching, sorting and comparing elements (or
entire containers).
The STL provides approximately 70 algorithms.
Most of them use iterators to access container elements.
Each algorithm has minimum requirements for the types of
iterators that can be used with it.
We’ll see that each first-class container supports specific
iterator types, some more powerful than others.
A container’s supported iterator type determines whether the
container can be used with a specific algorithm.
6
22.1 Introduction to the Standard Template Library (STL)
(Cont.)
Iterators encapsulate the mechanism used to access container
elements.
This encapsulation enables many of the STL algorithms to be
applied to several containers without regard for the underlying
container implementation.
As long as a container’s iterators support the minimum
requirements of the algorithm, then the algorithm can process
that container’s elements.
This also enables you to create new algorithms that can process
the elements of multiple container types.
7
8
22.1 Introduction to the Standard Template Library (STL)
(Cont.)
In Chapter 20, we studied data structures.
We built linked lists, queues, stacks and trees.
We carefully wove link objects together with pointers.
Pointer-based code is complex, and the slightest omission or
oversight can lead to serious memory-access violations and
memory-leak errors with no compiler complaints.
Implementing additional data structures, such as deques,
priority queues, sets and maps, requires substantial extra work.
An advantage of the STL is that you can reuse the STL
containers, iterators and algorithms to implement common data
representations and manipulations.
9
10
11
Iterators
Recall: generalization of a pointer
Typically even implemented with pointer!
"Abstraction" of iterators
Designed to hide details of implementation
Provide uniform interface across different
container classes
Each container class has "own" iterator type
Similar to how each data type has own
pointer type
19-12
12
Manipulating Iterators
Recall using overloaded operators:
++, --, ==, !=
*
So if p is iterator variable, *p gives access to data
pointed to by p
Vector template class
Has all above overloads
Also has members begin() and end()
c.begin();//Returns iterator for 1st item in c
c.end();//Returns "test" value for end
19-13
13
Cycling with Iterators
Recall cycling ability:
for (p=c.begin();p!=c.end();p++)
process *p//*p is current data item
Big picture so far…
Keep in mind:
Each container type in STL has own iterator types
Even though they’re all used similarly
19-14
14
Display 19.1
Iterators Used with a Vector (1 of 2)
19-15
1//Program to demonstrate STL iterators.
2#include <iostream>
3#include <vector>
4using std::cout;
5using std::endl;
6using std::vector;
7int main( )
8{
9 vector<int> container;
10 for (int i = 1; i <= 4; i++)
11 container.push_back(i);
12 cout << "Here is what is in the container:n";
13 vector<int>::iterator p;
14 for (p = container.begin( ); p != container.end( ); p++)
15 cout << *p << " ";
16 cout << endl;
17 cout << "Setting entries to 0:n";
18 for (p = container.begin( ); p != container.end( ); p++)
19 *p = 0;
15
Display 19.1
Iterators Used with a Vector (2 of 2)
19-16
20 cout << "Container now contains:n";
21 for (p = container.begin( ); p !=
container.end( ); p++)
22 cout << *p << " ";
23 cout << endl;
24 return 0;
25}
Sample Dialogue
Here is what is in the container:
1 2 3 4
Setting entries to 0:
Container now contains:
0 0 0 0
16
Vector Iterator Types
Iterators for vectors of ints are of type:
std::vector<int>::iterator
Iterators for lists of ints are of type:
std::list<int>::iterator
Vector is in std namespace, so need:
using std::vector<int>::iterator;
19-17
17
Kinds of Iterators
Vector iterators
Most "general" form
All operations work with vector iterators
Vector container great for iterator examples
19-18
18
Random Access:
Display 19.2 Bidirectional and
Random-Access Iterator Use
19-19
19
Iterator Classifications
Forward iterators:
++ works on iterator
Bidirectional iterators:
Both ++ and – work on iterator (“--“)
Random-access iterators:
++, --, and random access all work
with iterator
These are "kinds" of iterators, not types!
19-20
20
Constant and Mutable Iterators
Dereferencing operator’s behavior dictates
Constant iterator:
* produces read-only version of element
Can use *p to assign to variable or output,
but cannot change element in container
E.g., *p = <anything>; is illegal
Mutable iterator:
*p can be assigned value
Changes corresponding element in container
i.e.: *p returns an lvalue
19-21
21
Reverse Iterators
To cycle elements in reverse order
Requires container with bidirectional iterators
Might consider:
iterator p;
for (p=container.end();p!=container.begin(); p--)
cout << *p << " " ;
But recall: end() is just "sentinel", begin() not!
Might work on some systems, but not most
19-22
22
Reverse Iterators Correct
To correctly cycle elements in reverse
order:
reverse_iterator p;
for (rp=container.rbegin();rp!=container.rend(); rp++)
cout << *rp << " " ;
rbegin()
Returns iterator at last element
rend()
Returns sentinel "end" marker
19-23
23
Compiler Problems
Some compilers problematic with iterator
declarations
Consider our usage:
using std::vector<char>::iterator;
…
iterator p;
Alternatively:
std::vector<char>::iterator p;
And others…
Try various forms if compiler problematic
19-24
24
22.1.2 Introduction to Iterators (Cont.)
STL first-class containers provide member functions begin and
end.
Function begin returns an iterator pointing to the first element
of the container.
Function end returns an iterator pointing to the first element
past the end of the container (an element that doesn’t exist).
25
22.1.2 Introduction to Iterators (Cont.)
If iterator i points to a particular element, then ++i points to the
“next” element and *i refers to the element pointed to by i.
The iterator resulting from end is typically used in an equality
or inequality comparison to determine whether the “moving
iterator” (i in this case) has reached the end of the container.
An object of type iterator refers to a container element that can
be modified.
An object of type const_iterator refers to a container element
that cannot be modified.
26
22.1.2 Introduction to Iterators (Cont.)
Figure 22.9 shows the predefined iterator typedefs that are
found in the class definitions of the STL containers.
Not every typedef is defined for every container.
We use const versions of the iterators for traversing read-only
containers.
We use reverse iterators to traverse containers in the reverse
direction.
27
28
29
22.1.2 Introduction to Iterators (Cont.)
Figure 22.10 shows some operations that can be performed on
each iterator type.
The operations for each iterator type include all operations
preceding that type in the figure.
30
31
32
33
34
35
36
22.1.2 Introduction to Iterators (Cont.)
Figure 22.6 shows the categories of STL iterators.
Each category provides a specific set of functionality.
Figure 22.7 illustrates the hierarchy of iterator categories.
As you follow the hierarchy from top to bottom, each iterator
category supports all the functionality of the categories above it
in the figure.
Thus the “weakest” iterator types are at the top and the most
powerful one is at the bottom.
Note that this is not an inheritance hierarchy.
37
38
39
40
Containers
Container classes in STL
Different kinds of data structures
Like lists, queues, stacks
Each is template class with parameter for particular data type to
be stored
e.g., Lists of ints, doubles or myClass types
Each has own iterators
One might have bidirectional, another might just have forward
iterators
But all operators and members have same meaning
19-41
41
22.1.1 Introduction to Containers
The STL container types are shown in Fig. 22.1.
The containers are divided into three major categories—
sequence containers, associative containers and container
adapters.
42
43
44
22.1.1 Introduction to Containers (Cont.)
The sequence containers represent linear data structures, such as
vectors and linked lists.
Associative containers are nonlinear containers that typically
can locate elements stored in the containers quickly.
Such containers can store sets of values or key/value pairs.
The sequence containers and associative containers are
collectively referred to as the first-class containers.
As we saw in Chapter 20, stacks and queues actually are
constrained versions of sequential containers.
For this reason, STL implements stacks and queues as container
adapters that enable a program to view a sequential container in
a constrained manner.
45
22.1.1 Introduction to Containers (Cont.)
There are other container types that are considered “near
containers”—C-like pointer-based arrays (discussed in
Chapter 7), bitsets for maintaining sets of flag values and val-
arrays for performing high-speed mathematical vector
operations (this last class is optimized for computation
performance and is not as flexible as the first-class containers).
These types are considered “near containers” because they
exhibit capabilities similar to those of the first-class containers,
but do not support all the first-class-container capabilities.
Type string (discussed in Chapter 18) supports the same
functionality as a sequence container, but stores only character
data.
46
22.1.2 Introduction to Iterators (Cont.)
The iterator category that each container supports determines
whether that container can be used with specific algorithms in
the STL.
Containers that support random-access iterators can be used
with all algorithms in the STL.
As we’ll see, pointers into arrays can be used in place of
iterators in most STL algorithms, including those that require
random-access iterators.
Figure 22.8 shows the iterator category of each of the STL
containers.
The first-class containers (vectors, deques, lists, sets, multisets,
maps and multimaps), strings and arrays are all traversable with
iterators.
47
48
22.1.1 Introduction to Containers (Cont.)
Most STL containers provide similar functionality.
Many generic operations, such as member function size, apply
to all containers, and other operations apply to subsets of
similar containers.
This encourages extensibility of the STL with new classes.
Figure 22.2 describes the functions common to all Standard
Library containers.
[Note: Overloaded operators operator<, operator<=, operator>,
operator>=, operator== and operator!= are not provided for
priority_queues.]
49
50
51
52
22.1.1 Introduction to Containers (Cont.)
The header files for each of the Standard Library containers are
shown in Fig. 22.3.
The contents of these header files are all in namespace std.
53
54
22.1.1 Introduction to Containers (Cont.)
Figure 22.4 shows the common typedefs (to create synonyms or
aliases for lengthy type names) found in first-class containers.
These typedefs are used in generic declarations of variables,
parameters to functions and return values from functions.
For example, value_type in each container is always a typedef
that represents the type of value stored in the container.
55
56
57
58
59
22.1.1 Introduction to Containers (Cont.)
When preparing to use an STL container, it’s important to
ensure that the type of element being stored in the container
supports a minimum set of functionality.
When an element is inserted into a container, a copy of that
element is made.
For this reason, the element type should provide its own copy
constructor and assignment operator.
[Note: This is required only if default memberwise copy and
default memberwise assignment do not perform proper copy and
assignment operations for the element type.]
Also, the associative containers and many algorithms require
elements to be compared.
For this reason, the element type should provide an equality
operator (==) and a less-than operator (<).
60
61
Sequential Containers
Arranges list data
1st element, next element, … to last element
Linked list is sequential container
Earlier linked lists were "singly linked lists"
One link per node
STL has no "singly linked list"
Only "doubly linked list": template class list
19-62
62
Display 19.4 Two Kinds of Lists
19-63
63
Display 19.5
Using the list Template Class(1 of 2)
19-64
1//Program to demonstrate the STL template class list.
2#include <iostream>
3#include <list>
4using std::cout;
5using std::endl;
6using std::list;
7int main( )
8{
9 list<int> listObject;
10 for (int i = 1; i <= 3; i++)
11 listObject.push_back(i);
12 cout << "List contains:n";
13 list<int>::iterator iter;
14 for (iter = listObject.begin( ); iter != listObject.end( );
iter++)
15 cout << *iter << " ";
16 cout << endl;
64
Display 19.5
Using the list Template Class(2 of 2)
19-65
17 cout << "Setting all entries to 0:n";
18 for (iter = listObject.begin( ); iter != listObject.end( );
iter++)
19 *iter = 0;
20 cout << "List now contains:n";
21 for (iter = listObject.begin( ); iter != listObject.end( );
iter++)
22 cout << *iter << " ";
23 cout << endl;
24 return 0;
25}
SAMPLE DIALOGUE
List contains:
1 2 3
Setting all entries to 0:
List now contains:
0 0 0
65
Associative Containers
Associative container: simple database
Store data
Each data item has key
Example:
data: employee’s record as struct
key: employee’s SSN
Items retrieved based on key
19-66
66
22.3 Associative Containers
The STL’s associative containers provide direct access to store
and retrieve elements via keys (often called search keys).
The four associative containers are multiset, set, multimap and
map.
Each associative container maintains its keys in sorted order.
Iterating through an associative container traverses it in the sort
order for that container.
Classes multiset and set provide operations for manipulating
sets of values where the values are the keys—there is not a
separate value associated with each key.
The primary difference between a multiset and a set is that a
multiset allows duplicate keys and a set does not.
67
22.3 Associative Containers (Cont.)
Classes multimap and map provide operations for manipulating
values associated with keys (these values are sometimes
referred to as mapped values).
The primary difference between a multimap and a map is that a
multimap allows duplicate keys with associated values to be
stored and a map allows only unique keys with associated
values.
In addition to the common member functions of all containers
presented in Fig. 22.2, all associative containers also support
several other member functions, including find, lower_bound,
upper_bound and count.
Examples of each of the associative containers and the common
associative container member functions are presented in the
next several subsections.
68
set Template Class
Simplest container possible
Stores elements without repetition
1st insertion places element in set
Each element is own key
Capabilities:
Add elements
Delete elements
Ask if element is in set
19-69
69
22.3.2 set Associative Container
The set associative container is used for fast storage and
retrieval of unique keys.
The implementation of a set is identical to that of a multiset,
except that a set must have unique keys.
Therefore, if an attempt is made to insert a duplicate key into a
set, the duplicate is ignored; because this is the intended
mathematical behavior of a set, we do not identify it as a
common programming error.
A set supports bidirectional iterators (but not random-access
iterators).
Figure 22.20 demonstrates a set of doubles.
Header file <set> must be included to use class set.
70
Program Using the set Template Class (1 of 2)
19-71
1//Program to demonstrate use of the set template class.
2#include <iostream>
3#include <set>
4using std::cout;
5using std::endl;
6using std::set;
7int main( )
8{
9 set<char> s;
10 s.insert(’A’);
11 s.insert(’D’);
12 s.insert(’D’);
13 s.insert(’C’);
14 s.insert(’C’);
15 s.insert(’B’);
16 cout << "The set contains:n";
17 set<char>::const_iterator p;
18 for (p = s.begin( ); p != s.end( ); p++)
19 cout << *p << " ";
20 cout << endl;
71
Program Using the set Template Class (2 of 2)
19-72
21 cout << "Set contains 'C': ";
22 if (s.find('C')==s.end( ))
23 cout << " no " << endl;
24 else
26 cout << " yes " << endl;
27 cout << "Removing C.n";
28 s.erase(’C’);
29 for (p = s.begin( ); p != s.end( ); p++)
30 cout << *p << " ";
31 cout << endl;
32 cout << "Set contains 'C': ";
33 if (s.find('C')==s.end( ))
34 cout << " no " << endl;
35 else
36 cout << " yes " << endl;
37 return 0;
38}
SAMPLE DIALOGUE
The set contains:
A B C D
Set contains 'C': yes
Removing C.
A B D
Set contains 'C': no
72
Map Template Class
A function given as set of ordered pairs
For each value first, at most one value
second in map
Example map declaration:
map<string, int> numberMap;
Can use [ ] notation to access the map
For both storage and retrieval
Stores in sorted order, like set
Second value can have no ordering impact
19-73
73
22.3.4 map Associative Container
The map associative container performs fast storage and
retrieval of unique keys and associated values.
Duplicate keys are not allowed—a single value can be
associated with each key.
This is called a one-to-one mapping.
For example, a company that uses unique employee numbers,
such as 100, 200 and 300, might have a map that associates
employee numbers with their telephone extensions—4321, 4115
and 5217, respectively.
With a map you specify the key and get back the associated data
quickly.
A map is also known as an associative array.
Providing the key in a map’s subscript operator [] locates the
value associated with that key in the map.
74
Program Using the map Template Class (1 of 3)
19-75
1//Program to demonstrate use of the map template class.
2#include <iostream>
3 #include <map>
4#include <string>
5using std::cout;
6using std::endl;
7using std::map;
8using std::string;
9int main( )
10{
11 map<string, string> planets;
12 planets["Mercury"] = "Hot planet";
13 planets["Venus"] = "Atmosphere of sulfuric acid";
14 planets["Earth"] = "Home";
15 planets["Mars"] = "The Red Planet";
16 planets["Jupiter"] = "Largest planet in our solar system";
17 planets["Saturn"] = "Has rings";
18 planets["Uranus"] = "Tilts on its side";
19 planets["Neptune"] = "1500 mile per hour winds";
20 planets["Pluto"] = "Dwarf planet";
75
Program Using the map Template Class (2 of 3)
19-76
21 cout << "Entry for Mercury - " << planets["Mercury"]
22 << endl << endl;
23 if (planets.find("Mercury") != planets.end())
24 cout << "Mercury is in the map." << endl;
25 if (planets.find("Ceres") == planets.end())
26 cout << "Ceres is not in the map." << endl << endl;
27 cout << "Iterating through all planets: " << endl;
28 map<string, string>::const_iterator iter;
29 for (iter = planets.begin(); iter != planets.end(); iter++)
30 {
31 cout << iter->first << " - " << iter->second << endl;
32 }
The iterator will output the map in order sorted by the key. In
this case the output will be listed alphabetically by planet.
33 return 0;
34}
76
Program Using the map Template Class (3 of 3)
19-77
SAMPLE DIALOGUE
Entry for Mercury - Hot planet
Mercury is in the map.
Ceres is not in the map.
Iterating through all planets:
Earth - Home
Jupiter - Largest planet in our solar system
Mars - The Red Planet
Mercury - Hot planet
Neptune - 1500 mile per hour winds
Pluto - Dwarf planet
Saturn - Has rings
Uranus - Tilts on its side
Venus - Atmosphere of sulfuric acid
77
Container Adapters stack and queue
Container adapters are template classes
Implemented "on top of" other classes
Example:
stack template class by default implemented on
top of deque template class
Buried in stack’s implementation is deque where all data resides
Others:
queue, priority_queue
19-78
78
Specifying Container Adapters
Adapter template classes have "default"
containers underneath
But can specify different underlying container
Examples:
container
Implementing Example:
stack<int, vector<int>>
Makes vector underlying container for stack
19-79
79
22.4 Container Adapters
The STL provides three container adapters—stack, queue and
priority_queue.
Adapters are not first-class containers, because they do not
provide the actual data-structure implementation in which
elements can be stored and because adapters do not support
iterators.
The benefit of an adapter class is that you can choose an
appropriate underlying data structure.
All three adapter classes provide member functions push and
pop that properly insert an element into each adapter data
structure and properly remove an element from each adapter
data structure.
80
22.4.1 stack Adapter
Class stack enables insertions into and deletions from the
underlying data structure at one end (commonly referred to as a
last-in, first-out data structure).
A stack can be implemented with any of the sequence
containers: vector, list and deque.
This example creates three integer stacks, using each of the
sequence containers of the Standard Library as the underlying
data structure to represent the stack.
By default, a stack is implemented with a deque.
81
22.4.1 stack Adapter (Cont.)
The stack operations are push to insert an element at the top of
the stack (implemented by calling function push_back of the
underlying container), pop to remove the top element of the
stack (implemented by calling function pop_back of the
underlying container), top to get a reference to the top element
of the stack (implemented by calling function back of the
underlying container), empty to determine whether the stack is
empty (implemented by calling function empty of the
underlying container) and size to get the number of elements in
the stack (implemented by calling function size of the
underlying container).
82
83
84
22.4.2 queue Adapter
Class queue enables insertions at the back of the underlying
data structure and deletions from the front (commonly referred
to as a first-in, first-out data structure).
A queue can be implemented with STL data structure list or
deque.
By default, a queue is implemented with a deque.
85
22.4.2 queue Adapter (Cont.)
The common queue operations are push to insert an element at
the back of the queue (implemented by calling function
push_back of the underlying container), pop to remove the
element at the front of the queue (implemented by calling
function pop_front of the underlying container), front to get a
reference to the first element in the queue (implemented by
calling function front of the underlying container), back to get a
reference to the last element in the queue (implemented by
calling function back of the underlying container), empty to
determine whether the queue is empty (implemented by calling
function empty of the underlying container) and size to get the
number of elements in the queue (implemented by calling
function size of the underlying container).
86
87
88
22.4.3 priority_queue Adapter (Cont.)
Class priority_queue provides functionality that enables
insertions in sorted order into the underlying data structure and
deletions from the front of the underlying data structure.
A priority_queue can be implemented with STL sequence
containers vector or deque.
By default, a priority_queue is implemented with a vector as the
underlying container.
When elements are added to a priority_queue, they’re inserted
in priority order, such that the highest-priority element (i.e., the
largest value) will be the first element removed from the
priority_queue.
89
22.4.3 priority_queue Adapter (Cont.)
This is usually accomplished by arranging the elements in a
binary tree structure called a heap that always maintains the
largest value (i.e., highest-priority element) at the front of the
data structure.
We discuss the STL’s heap algorithms in Section 22.5.12.
The comparison of elements is performed with comparator
function object less< T > by default, but you can supply a
different comparator.
There are several common priority_queue operations.
push inserts an element at the appropriate location based on
priority order of the priority_queue (implemented by calling
function push_back of the underlying container, then reordering
the elements using heapsort).
90
22.4.3 priority_queue Adapter (Cont.)
pop removes the highest-priority element of the priority_queue
(implemented by calling function pop_back of the underlying
container after removing the top element of the heap).
top gets a reference to the top element of the priority_queue
(implemented by calling function front of the underlying
container).
empty determines whether the priority_queue is empty
(implemented by calling function empty of the underlying
container).
size gets the number of elements in the priority_queue
(implemented by calling function size of the underlying
container).
91
92
93
22.5 Algorithms
Until the STL, class libraries of containers and algorithms were
essentially incompatible among vendors.
Early container libraries generally used inheritance and
polymorphism, with the associated overhead of virtual function
calls.
Early libraries built the algorithms into the container classes as
class behaviors.
The STL separates the algorithms from the containers.
This makes it much easier to add new algorithms.
With the STL, the elements of containers are accessed through
iterators.
The next several subsections demonstrate many of the STL
algorithms.
94
SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx
SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx
SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx
SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx
SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx

More Related Content

Similar to SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx

Religion And Science As
Religion And Science AsReligion And Science As
Religion And Science As
j0hnharding
 
Creation Vs Evolution Essay
Creation Vs Evolution EssayCreation Vs Evolution Essay
Creation Vs Evolution Essay
NeedHelpWritingAPape
 
Science and Religion - The origins of the universe
Science and Religion - The origins of the universeScience and Religion - The origins of the universe
Science and Religion - The origins of the universe
John Wilkins
 
Science of oneness
Science of onenessScience of oneness
Science of oneness
imaya varamban
 
The search for extra-terrestrial life - Historical and theological perspectives
The search for extra-terrestrial life - Historical and theological perspectivesThe search for extra-terrestrial life - Historical and theological perspectives
The search for extra-terrestrial life - Historical and theological perspectives
BETA-UFO Indonesia
 
History of science, what is science? stages of science...
History of science, what is science? stages of science...History of science, what is science? stages of science...
History of science, what is science? stages of science...
Pankaj Dhangare
 
Creationism Vs Evolution Essay
Creationism Vs Evolution EssayCreationism Vs Evolution Essay
Creationism Vs Evolution Essay
Paper Writing Service Reviews
 
Shenton daniel the earth is flat
Shenton daniel   the earth is flatShenton daniel   the earth is flat
Shenton daniel the earth is flat
Fabio Brandespim
 
Evolution Creationism Vs. Creationism
Evolution Creationism Vs. CreationismEvolution Creationism Vs. Creationism
Evolution Creationism Vs. Creationism
I Don'T Want To Write My Paper
 
Anthropic cosmological principles
Anthropic cosmological principlesAnthropic cosmological principles
Anthropic cosmological principles
Carlos Alberto Monteiro da Silva
 
The collapse of atheism. english
The collapse of atheism. englishThe collapse of atheism. english
The collapse of atheism. english
HarunyahyaEnglish
 
L4 After the 6th Day
L4 After the 6th DayL4 After the 6th Day
L4 After the 6th Day
Academy for Christian Thought
 

Similar to SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx (12)

Religion And Science As
Religion And Science AsReligion And Science As
Religion And Science As
 
Creation Vs Evolution Essay
Creation Vs Evolution EssayCreation Vs Evolution Essay
Creation Vs Evolution Essay
 
Science and Religion - The origins of the universe
Science and Religion - The origins of the universeScience and Religion - The origins of the universe
Science and Religion - The origins of the universe
 
Science of oneness
Science of onenessScience of oneness
Science of oneness
 
The search for extra-terrestrial life - Historical and theological perspectives
The search for extra-terrestrial life - Historical and theological perspectivesThe search for extra-terrestrial life - Historical and theological perspectives
The search for extra-terrestrial life - Historical and theological perspectives
 
History of science, what is science? stages of science...
History of science, what is science? stages of science...History of science, what is science? stages of science...
History of science, what is science? stages of science...
 
Creationism Vs Evolution Essay
Creationism Vs Evolution EssayCreationism Vs Evolution Essay
Creationism Vs Evolution Essay
 
Shenton daniel the earth is flat
Shenton daniel   the earth is flatShenton daniel   the earth is flat
Shenton daniel the earth is flat
 
Evolution Creationism Vs. Creationism
Evolution Creationism Vs. CreationismEvolution Creationism Vs. Creationism
Evolution Creationism Vs. Creationism
 
Anthropic cosmological principles
Anthropic cosmological principlesAnthropic cosmological principles
Anthropic cosmological principles
 
The collapse of atheism. english
The collapse of atheism. englishThe collapse of atheism. english
The collapse of atheism. english
 
L4 After the 6th Day
L4 After the 6th DayL4 After the 6th Day
L4 After the 6th Day
 

More from kenjordan97598

You are the Nursing Director for the medical-surgical area of a .docx
You are the Nursing Director for the medical-surgical area of a .docxYou are the Nursing Director for the medical-surgical area of a .docx
You are the Nursing Director for the medical-surgical area of a .docx
kenjordan97598
 
You are the newly appointed director of the Agile County Airport.docx
You are the newly appointed director of the Agile County Airport.docxYou are the newly appointed director of the Agile County Airport.docx
You are the newly appointed director of the Agile County Airport.docx
kenjordan97598
 
You are working on an address book database with a table called Cont.docx
You are working on an address book database with a table called Cont.docxYou are working on an address book database with a table called Cont.docx
You are working on an address book database with a table called Cont.docx
kenjordan97598
 
You are the new Security Manager for a small bank in Iowa. They are .docx
You are the new Security Manager for a small bank in Iowa. They are .docxYou are the new Security Manager for a small bank in Iowa. They are .docx
You are the new Security Manager for a small bank in Iowa. They are .docx
kenjordan97598
 
You are working in a rural Family Planning Health clinic and a 16 y.docx
You are working in a rural Family Planning Health clinic and a 16 y.docxYou are working in a rural Family Planning Health clinic and a 16 y.docx
You are working in a rural Family Planning Health clinic and a 16 y.docx
kenjordan97598
 
You are working in a family practice when your newly diagnosed T.docx
You are working in a family practice when your newly diagnosed T.docxYou are working in a family practice when your newly diagnosed T.docx
You are working in a family practice when your newly diagnosed T.docx
kenjordan97598
 
You are working for the Chief of Staff (CoS) for a newly elected Gov.docx
You are working for the Chief of Staff (CoS) for a newly elected Gov.docxYou are working for the Chief of Staff (CoS) for a newly elected Gov.docx
You are working for the Chief of Staff (CoS) for a newly elected Gov.docx
kenjordan97598
 
You are working at Johnson and Cohen law firm and have recently .docx
You are working at Johnson and Cohen law firm and have recently .docxYou are working at Johnson and Cohen law firm and have recently .docx
You are working at Johnson and Cohen law firm and have recently .docx
kenjordan97598
 
You are working for a community counseling agency, and you are taske.docx
You are working for a community counseling agency, and you are taske.docxYou are working for a community counseling agency, and you are taske.docx
You are working for a community counseling agency, and you are taske.docx
kenjordan97598
 
You are working as the software tester for a big enterprise comp.docx
You are working as the software tester for a big enterprise comp.docxYou are working as the software tester for a big enterprise comp.docx
You are working as the software tester for a big enterprise comp.docx
kenjordan97598
 
You are working as HelpDesk Support for an organization where your u.docx
You are working as HelpDesk Support for an organization where your u.docxYou are working as HelpDesk Support for an organization where your u.docx
You are working as HelpDesk Support for an organization where your u.docx
kenjordan97598
 
You are working as an APRN in your local primary care office. Th.docx
You are working as an APRN in your local primary care office. Th.docxYou are working as an APRN in your local primary care office. Th.docx
You are working as an APRN in your local primary care office. Th.docx
kenjordan97598
 
You are the new Public Information Officer (PIO) assigned by the.docx
You are the new Public Information Officer (PIO) assigned by the.docxYou are the new Public Information Officer (PIO) assigned by the.docx
You are the new Public Information Officer (PIO) assigned by the.docx
kenjordan97598
 
You are welcome to go to the San Diego Zoo any time you would li.docx
You are welcome to go to the San Diego Zoo any time you would li.docxYou are welcome to go to the San Diego Zoo any time you would li.docx
You are welcome to go to the San Diego Zoo any time you would li.docx
kenjordan97598
 
You are visiting one of your organization’s plants in a poor nation..docx
You are visiting one of your organization’s plants in a poor nation..docxYou are visiting one of your organization’s plants in a poor nation..docx
You are visiting one of your organization’s plants in a poor nation..docx
kenjordan97598
 
You are to write a four-page (typed, double-spaced) essay addressing.docx
You are to write a four-page (typed, double-spaced) essay addressing.docxYou are to write a four-page (typed, double-spaced) essay addressing.docx
You are to write a four-page (typed, double-spaced) essay addressing.docx
kenjordan97598
 
You are to write a 7-page Biographical Research Paper of St Franci.docx
You are to write a 7-page Biographical Research Paper of St Franci.docxYou are to write a 7-page Biographical Research Paper of St Franci.docx
You are to write a 7-page Biographical Research Paper of St Franci.docx
kenjordan97598
 
You are to write a 1050 to 1750 word literature review (in a.docx
You are to write a 1050 to 1750 word literature review (in a.docxYou are to write a 1050 to 1750 word literature review (in a.docx
You are to write a 1050 to 1750 word literature review (in a.docx
kenjordan97598
 
You are to take the uploaded assignment and edit it. The title shoul.docx
You are to take the uploaded assignment and edit it. The title shoul.docxYou are to take the uploaded assignment and edit it. The title shoul.docx
You are to take the uploaded assignment and edit it. The title shoul.docx
kenjordan97598
 
You are to use a topic for the question you chose.WORD REQUIRE.docx
You are to use a topic for the question you chose.WORD REQUIRE.docxYou are to use a topic for the question you chose.WORD REQUIRE.docx
You are to use a topic for the question you chose.WORD REQUIRE.docx
kenjordan97598
 

More from kenjordan97598 (20)

You are the Nursing Director for the medical-surgical area of a .docx
You are the Nursing Director for the medical-surgical area of a .docxYou are the Nursing Director for the medical-surgical area of a .docx
You are the Nursing Director for the medical-surgical area of a .docx
 
You are the newly appointed director of the Agile County Airport.docx
You are the newly appointed director of the Agile County Airport.docxYou are the newly appointed director of the Agile County Airport.docx
You are the newly appointed director of the Agile County Airport.docx
 
You are working on an address book database with a table called Cont.docx
You are working on an address book database with a table called Cont.docxYou are working on an address book database with a table called Cont.docx
You are working on an address book database with a table called Cont.docx
 
You are the new Security Manager for a small bank in Iowa. They are .docx
You are the new Security Manager for a small bank in Iowa. They are .docxYou are the new Security Manager for a small bank in Iowa. They are .docx
You are the new Security Manager for a small bank in Iowa. They are .docx
 
You are working in a rural Family Planning Health clinic and a 16 y.docx
You are working in a rural Family Planning Health clinic and a 16 y.docxYou are working in a rural Family Planning Health clinic and a 16 y.docx
You are working in a rural Family Planning Health clinic and a 16 y.docx
 
You are working in a family practice when your newly diagnosed T.docx
You are working in a family practice when your newly diagnosed T.docxYou are working in a family practice when your newly diagnosed T.docx
You are working in a family practice when your newly diagnosed T.docx
 
You are working for the Chief of Staff (CoS) for a newly elected Gov.docx
You are working for the Chief of Staff (CoS) for a newly elected Gov.docxYou are working for the Chief of Staff (CoS) for a newly elected Gov.docx
You are working for the Chief of Staff (CoS) for a newly elected Gov.docx
 
You are working at Johnson and Cohen law firm and have recently .docx
You are working at Johnson and Cohen law firm and have recently .docxYou are working at Johnson and Cohen law firm and have recently .docx
You are working at Johnson and Cohen law firm and have recently .docx
 
You are working for a community counseling agency, and you are taske.docx
You are working for a community counseling agency, and you are taske.docxYou are working for a community counseling agency, and you are taske.docx
You are working for a community counseling agency, and you are taske.docx
 
You are working as the software tester for a big enterprise comp.docx
You are working as the software tester for a big enterprise comp.docxYou are working as the software tester for a big enterprise comp.docx
You are working as the software tester for a big enterprise comp.docx
 
You are working as HelpDesk Support for an organization where your u.docx
You are working as HelpDesk Support for an organization where your u.docxYou are working as HelpDesk Support for an organization where your u.docx
You are working as HelpDesk Support for an organization where your u.docx
 
You are working as an APRN in your local primary care office. Th.docx
You are working as an APRN in your local primary care office. Th.docxYou are working as an APRN in your local primary care office. Th.docx
You are working as an APRN in your local primary care office. Th.docx
 
You are the new Public Information Officer (PIO) assigned by the.docx
You are the new Public Information Officer (PIO) assigned by the.docxYou are the new Public Information Officer (PIO) assigned by the.docx
You are the new Public Information Officer (PIO) assigned by the.docx
 
You are welcome to go to the San Diego Zoo any time you would li.docx
You are welcome to go to the San Diego Zoo any time you would li.docxYou are welcome to go to the San Diego Zoo any time you would li.docx
You are welcome to go to the San Diego Zoo any time you would li.docx
 
You are visiting one of your organization’s plants in a poor nation..docx
You are visiting one of your organization’s plants in a poor nation..docxYou are visiting one of your organization’s plants in a poor nation..docx
You are visiting one of your organization’s plants in a poor nation..docx
 
You are to write a four-page (typed, double-spaced) essay addressing.docx
You are to write a four-page (typed, double-spaced) essay addressing.docxYou are to write a four-page (typed, double-spaced) essay addressing.docx
You are to write a four-page (typed, double-spaced) essay addressing.docx
 
You are to write a 7-page Biographical Research Paper of St Franci.docx
You are to write a 7-page Biographical Research Paper of St Franci.docxYou are to write a 7-page Biographical Research Paper of St Franci.docx
You are to write a 7-page Biographical Research Paper of St Franci.docx
 
You are to write a 1050 to 1750 word literature review (in a.docx
You are to write a 1050 to 1750 word literature review (in a.docxYou are to write a 1050 to 1750 word literature review (in a.docx
You are to write a 1050 to 1750 word literature review (in a.docx
 
You are to take the uploaded assignment and edit it. The title shoul.docx
You are to take the uploaded assignment and edit it. The title shoul.docxYou are to take the uploaded assignment and edit it. The title shoul.docx
You are to take the uploaded assignment and edit it. The title shoul.docx
 
You are to use a topic for the question you chose.WORD REQUIRE.docx
You are to use a topic for the question you chose.WORD REQUIRE.docxYou are to use a topic for the question you chose.WORD REQUIRE.docx
You are to use a topic for the question you chose.WORD REQUIRE.docx
 

Recently uploaded

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 

Recently uploaded (20)

How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 

SCMNCERELIGIOIFrom Conflict to ConversationJohn F. .docx

  • 1. SCMNCE RELIGIOI From Conflict to Conversation John F. Haught PAULIST PRESS New York . Mahwah, N.J. also by Jolm E Haught publÍshed by Paulist Press THE PROMISE OFNATURE. WHAT IS COD? WHATIS RELIGION? Copyright @ 1995 by John F. Haught All rights reserved. No part of this book may be reproduced or transmined in any form or by any means, electronic or mechanicar, incruàing photocopying, rccording or by any information storage and retrieval system without permissiôn in writing fàm the h¡blisher. Library of Congress Cataloging-in-publication Data Haught. John F.
  • 2. science and religion : from confricr to conversation / John F. Haught. P. cm. Includes bibliographical references and index. ISBN 0-8091-3606-6 (alk. paper): 04784 (clorh) l. Religion and science. 2. Religion and science_Hisrory. I. Tltle. 8L24.0.2.H385 r99s 291.rt15;4¿20 '!1 .i'r¡Ut¡sneO by Paulist Press 997 Maca¡thur Boqlevard Mahwah, New Jersey 07430 Printed and bound in the United Søtes of America 95-32t24 CIP Contents Preface ......... I Introduction .....3 l. Is Religion Opposed to Science? . . . . 9 2. Does Science Rule Out a Personal God? . -.... . .n 3. Does Evolution Rule Out God's Existence? . . . . . .47 4.IsLifeReducibletoChemistry? .... .....72 S.WastheUniverseCreated? ......100 6. DoWeBelongHere? .....120 7. Why Is There Complexity in Nature? . . . .I4Z 8. DoestheUniverseHaveaPurpose? .....L62
  • 3. 9. Is Religion Responsible for the Ecological Crisis? . . . . . tg3 Conclusion: Toward Conversation in Science and Religion .... .. .ZOz Notes ..204 Index . .......216 5 Was the fJniverse Created? No teaching is more vital to the God-religions than that of creation. This doctrine interprets the universe fundamentally as a gift freely brought into existence by a powerft.rl, loving and personal "Creator." The cosmos, in other words, is not self-originating, but the product of a transcendent goodness. The Hebrew scriptures tell us that "in the begin- ning" it was God who made the heavens and the earth. And traditional Ch¡istian and Muslim theism even maintains that God creates the world ex nihilo, out of nothing. What bearing, then, does modern science have on the believability of this most fundamental of Western religious teach- ings? Does science make the doctrine of creation less or more credible? The British scientist Peter Atkins bluntly answers that modern cos-
  • 4. mology renders the notion of creation by God completely superfluous.' And althoughAtkins himself seems undisturbed by it, his interpretation strikes at the heart of what many consider one of the most important truths in their lives. To religious believers the doctrine of creation is much more than a story intended to satisfy human curiosity about how everything began. Its import goes much deeper, for it speaks directly to a common human concern about whether there are any realistic grounds for hope in the meaning of our lives and of the universe. If a transcendent power and beneficence brought the universe into being, then this Same power and goodness could surely also deliver us from all evils and lead us to the fulfillment for which we long. A God capable of bringing this whole universe into existence would have the power also to bring about salvation for those in despair. A Creator could even bring the dead back to life. The existence of a Creator would mean that there is a reason to believe that the entire universe has tnn Was the Universe Created? l0l a deep significance to it, even though we may not know now exactly
  • 5. what it is. How momentous a thing it would be, then, if science either gave fresh support to or placed under new suspicion the credibility of this central religious teaching. Is it any wonder that some of the liveliest discussions in science and religion today have to do with the creation of the universe? The recently formulated "big bang" theory of cosmic origins seems to imply, at least at first sight, that the universe had a beginning. And if it had a beginning would this not perhaps mean that the biblical idea of divine creation as depicted in Genesis makes scientific sense after all?, Many scientists, as we shall see, are still uncomfortable with the idea of a universe that came into existence by an act of divine creation. some of them, fôr that matte¡ are not convinced that it ever came into existence at all. Perhaps the universe always was and always wiil be. But today ãoesn't the "big bang" theory serirously challenge such a notion? From antiquity philosophers have often taken it for granted that the universe is eternal and uncreated. Plato and Aristotle held this opinion, as did many of the other Greek philosophers. Democritus, long before
  • 6. Aristotle, taught that the universe was made up of "atoms and the void" that have existed from eternity. And, at least until very recently, almost all modern materialists had assumed that matter is unoriginated and everlasting. Science, however, now seems to have laid to rest the idea of an eternally existing universe. of course it has not done so without a struggle, and there are still many unbelievers. For a long time, we should recall, even Albert Einstein was convinced that the universe must have existed forever, and this is one reason for his rejecting the idea of a personal God. Such a God is simply unnecessary, he thought, as long as an eternally ordered universe is the matrix and source of all things. And so it is not su¡prising thar in spite of all the talk today about the big bang, some scientists still attempt to salvage the notion of a universe without any beginning. They do this either by way of hypoth- esizing the existence of an endless series of "worlds," or by experi- menting with other fascinating ideas that might somehow help us evade the conclusion that the universe had to have a beginning. If they can eliminate any crisp point of cosmic origins they expect thereby to make the notion of a Creator unnecessary.
  • 7. Some theologians, as noted below, would respond that even an eter- nally existing universe (whatever that might mean) does not rule out the necessity of a creator or originator. But the su¡prising astrophysi- t02 Science and Religion cal discoveries of this century have by now led most scientists to doubt that the universe has,in fact existed forever. The consensus of recent cosmology is that the universe's temporal duration, though unimagin- ably immense, is still finite. And so we are left with these questions: If the universe has not exist- ed forever, does its origin require some transcendent cause? And is this alleged cause equivalent to what theism calls God? Or is it possible that our finite universe arose spontaneously, without any cause at all? Suspicion that our universe did indeed have a definite beginning was first aroused in this century by scientific observations that cosmic space is expanding. But a spatially expanding cosmos requires a
  • 8. dis- crete starting point, for if we keep going back into the remote past along the lines of cosmic expansion we eventually have to arrive at a tiny point from which the increase in size first began. Observation now shows that the galaxies, whose immense number was also discovered only in this century, are moving away from each other and that the uni- verse is still evolving.t So a very long time ago the whole of physical reality must have been squeezed into an unimaginably small and dense grain of matter. Particle physics now even allows that this compact speck may originally have been no larger than an atom's nucleus. Then fifteen or so billion years ago this incredibly compressed pin- head of matter began to "explode," creating space and time in the process. The resulting fireball is usually called the "big bang," and it is generally associated with the beginning of the universe. In thinking about the big bang, then, we have apparently arrived at the temporal "edge" of the cosmos. And even though philosophers. scientists and theologians tell us to be very careful about raising silly
  • 9. questions about the big bang, it is nevertheless hard to refrain from asking whether any- thing lies on the other side of it. Is it nothing? Or is it God? In 1917, while studying Einstein's newly formulated equations on general relativity, the Dutch physicist Willem de Sitter concluded that they implied a changing, expanding cosmos' If the universe were eter- nal and static, after all, the various masses would by now have col- lapsed gravitationally upon one another. So the universe must be con- stantly changing, and this could mean that it also had a beginning. Again in 1922, a Russian mathematician by the name of Alexander Friedmann calculated that general relativity challenges the idea of an eternally unchanging universe. Both De Sitter and Friedmann wrote to Einstein about their suspicions, but the most famous scibntist of our century was not ready to accept a cosmology in which the universe Was the (Jniverse Created? 103 arose from a singular starting point. Such singularities are not
  • 10. conge- nial, he thought, to scientific understanding, for science seeks a universal, inielligible lawfulness. Out of his need for universality Einstein had always clung to the idea that the cosmos must be eternal and necessary rather than dynamically changing' This is why he pre- ferred a universe with no birth, one extending back into the eternal sameness of an indefinite past. And so he responded to de Sitter's and Friedmann,s disturbing reports by changing his original, computations, introducing into them an artificial and, as it turns out, purely fictitious "cosmological constant." Some constant repulsive feature inhe¡ent in the cosmols, he surmised, must keep the stars apart and prevent the uni- verse from collaPsing. EdwinA bit later, however, Einstein met the American astronomer ' Hubble who provided him with what seemed to be observational evi-
  • 11. dence of a dynamic universe. Hubble had been looking at several galax- ies through the powerful Mount Wilson telescope and had noticed that - the frequàncies of the light radiating from some of them were measur- ably .,shifted" toward the red end of the spectrum. This could only mean that the light waves are longer than normal and that the object emitting the light must be moving away from the observer. The best explana:tion foi this "red-shift" phenomenon, he concluded, is that the gaìaxies are receding from the earth and from each other at enormous Ipeeds. Experimental science was now confirming the expanding uni- *rs" preoicted by Einstein's equations. Einstein was forced to concede the point, and he later admitted that his introduction of the "cosmologi-
  • 12. cal constant" was an enollnous blunder' And yet, misgivings about the big bang continued even after Hubble's disclosures. It was difhcult for many scientists to break away from their longing for a more stable universe. The new theory was given a considãrable boost, however, when in 1965 scientists Robert wil.on and Arno Penzias discovered a low temperature cosmic back- ground microwave radiation which could best be interpreted as the ;afterglow" of an initial hot big bang. This radiation was the clearest signaito date that a singular originating cosmic event had occurred some fifteen billion years ago. It was now getting harder to doubt that the universe began with something like the big bang' But doubts still lingered on, and perhaps for good reason' The big bang theory of cosmic origins seemed to imply that the universe ema- natiig from the initial expansion would be smooth and uniform
  • 13. in all directions. Yet astronomy now makes us realize more clearly than ever 104 Science and Religion that we live in a very lumpy universe. That is, cosmic matter comes together in huge clots,in some places while being more thinly scattered elsewhere. Our cosmos is made up of very unevenly distributed galax- ies, clusters and super-clusters of galaxies, stars, planets, gases and other not yet fully understood kinds of matter. Immense empty spaces, for example, separate some groupings of galaxies, while others are more intimately connected. If the universe really began with a smooth big bang, then how could it have gotten so far removed from uniform distri- bution of matter today? To produce all the irregularity that astronomers are now aware of, the universe must have possessed the seeds of such unevenness even at the very earliest stages of its development. But the big bang theory did not seem to take these features into account. Up until a couple of years ago some scientists were even prepared to reject the theory unless it could explain the ragged dispersal of matter.
  • 14. However, in the spring of 1992 doubts were apparently dispelled. Data carefully collected from a satellite called the Cosmic Background Explorer (COBE) appeared to show that as early as 300,000 years after the big bang, when the universe was still in its infancy, the radiation out of which later forms of matter evolved had already assumed a distinc- tively rippled character. The primordial wrinkles were probably the "seeds" ofthe uneven universe we have today. So the big bang theory seems safe-at least for now.l Nevertheless, some scientists persist in their "unbelief." Though admittedly without any evidence. they conjecture thar we may live in an "oscillating universe." Perhaps over a period of many billions of years the universe recurrently contracts and expands unceasingly in an infinitely prolonged series of "big bangs" and "big crunches." This provocative hypothesis appeals especially to some scientists who find the idea of divine creation difficult to swallow. Other scientists, however, have replied that an infìnite series of worlds is still a problematic notion in view of the second law of thermodynam- ics. This remorseless law of physics maintains that the available energy in the universe is gradually winding down irreversibly, like a
  • 15. clock whose spring-tension eventually gives out altogether. So even if there have been many oscillations (big bangs followed by big crunches) the cosmos nonetheless would be slowly running out of available energy over the long run. Hence the law of thermodynamic ineversibility requires that the whole series of hypothetical universes must itself have had a singular beginning, perhaps many oscillations ago. So the dispute continues about whether the universe ever had a Was the Universe Created? 105 clearly definable beginning. some scientists are not sure that the same laws of thermodynamics operative in our world today would be applic- able in alternative episodes of an oscillating universe. Science has not to everyone's satisfaction definitively ruled out the possibility that the cosmos is eternal. There is no concrete evidence to support the idea that there have been an infinite number of "big bangs," but there is no way to disprove it either. In the discussion below, a question arises as to whether it is pure sci- ence, or rather some very non-scientific "beliefs," that have led a few skeptical cosmologists to cling so tenaciously to such ideas as an
  • 16. oscillating universe and other equally imaginative cosmological theo- ries when there is no empirical evidence that could confirm or falsify them. Perhaps one motive for flirting with the extravagant idea of mul- tiple universes is that it helps to save the idea that the origin of life could have been a purely random event, and therefore one that required ¡o special divine intervention.a For in the absence of a creator, an infi- nitely prolonged series or proliferation of "worlds" would give life a larger window of opportunity to come about by chance alone. After all, the probability of life's originating purely by chance in a single uni- verse might be very small. But if there were an infinite number of big bangs and big squeezes, then life has an indefinitely wider range of oc- casions to pop up accidentally during one, or perhaps even several, of these runs.5 Science today has shown that innumerable physical coincidences have to come together if life is to be possible at all. But if there were an infinite number of attempts at universes, sooner or later one of them is bound to succeed in having those special conditions that give rise to life. In such a case our own apparently improbable existence would not
  • 17. be so unexpected after all. In fact. it would be an almost inevitable eventual outcome of a gigantic cosmic lottery involving an infinite series of mostly lifeless and mindless worlds. Nevertheless, until actual evidence of such innumerable worlds comes forth, it seems more appropriate in our present discussion that we look at the relationship of the religious doctrine of creation to the world of current scientific consensus. As it turns out, the cosmos articulated in terms of the widely accepted big bang theory of cosmic origins is fasci- nating enough, and firmly enough established, to stir some interesting, though quite diverse, reactions. Does big bang cosmology provide a suf- ficiently substantive basis for a scientific certification ofthe theology of creation? Here are some possible answers. 106 Science and Religion I. Conflict At first sight, nothing in modern science would seem to be more sup- portive of the idea of a Creator God, and therefore of religion's plausi- bility, than the big bang theory of cosmic origins. In the Revised Standard Version, the Bible starts out with the words: "In the
  • 18. begin- ning, God created the heavens and the earlh." And now, after many cen- turies in which philosophers and scientists have assumed that matter is eternal, it turns out that science itself is finally leaning toward the notion that the universe is temporally finite. Could we find a more obvious basis for reuniting theology and science than in the idea that the universe had a beginning? For how better than through the doctrine of creation-and the idea of a Creator God-could we explain how the cosmos came into existence so abruptly out of apparent nothingness? A great deal of ink has been spilled in attempts to show that big bang physics has made the theological idea of creation intellectually respect- able once again. Although fundamentalists reject big bang astrophysics because it makes the universe too old to fit into the narrow time period (roughly 10,000 years) allowed by their biblical literalism, some orher conservative christians like Norman Geisler and Kerby Anderson are now claiming that "the big bang theory of the origin of the universe has resurrected the possibility of a creationist view of origins in astron- omy."6 The book of Genesis has apparently found conclusive support in
  • 19. the new cosmology. As you might have anticipated, however, we scientific skeptics will need much more than big bang physics to lead us back to religious faith. For it is not at all self-evident thatjusr because the universe had a beginning it also had to have a Creator. Quantum physics in fact allows for the possibility that the universe came inro being out of nothing.The cosmos may have had a beginning, but it could have burst into exis- tence spontaneously, without any cause. The scientific basis for this admittedly counter-intuitive hypothesis is the following. At one time, according to big bang theory and quan- tum physics, the universe was about the size of a subatomic particle, and so we can assume that it behaved the way such particles do. But ac- cording to quantum theory the appearance of such particles does not need to have any antecedent determining cause. The so-called ..virtual" particles of microphysics simply pass in and out of existence- sponta- neously. V/hy then couldn't the primitive universe, in its subatomic Was the (Jniverse Created? 107
  • 20. dimensions, also have come into existence in the same way, that is' without any cause whatsoever? Douglas Lackey explains: ...the big bang might t uu" no cause. How then did it happen? One expla- sñãälst partirtes, tttis oscillation between energy levels may cause the energy to drop to zero, at which point the particle ceases to exist. Conversely, the oscillation can raise a particle from zero to some finite ; level; that is, it brings a particle into existence. Such particles, usually called virtual particles, are literally coming into existence from a vacu- um. that is,from nothing....one could explain the Big Bang as a fluctua- tion in a vacuum, like the fluctuations that bring virtual particles into existence. But if the fluctuations are spontaneous, then the creation of the universe from a vacuum is also spontaneous't Moreover, the renowned astrophysicist Stephen Hawking recently gave our skepticism a significant boost by theorizing that, though the
  • 21. universe is not eternal. it still might not have had a clear temporal beginning. This is hard for common sense to grasp, but since modern physics emphasizes the close connection between time and space, iTawking .ubrniß that it is possible to conceive of time as emerging only gradually out of space. and so there may well have been no abrupt, cteárty defined first moment, and therefore no first cause either. He writes: The idea that space and time may form a closed surface without bound- ary...has profound implications for the role of God in the affairs of the universe. With the success of scientific theories in describing events, most people have come to believe that God allows the universe to evolve according to a set of laws and dOes not intervene in the universe to break these laws. However, the laws do not tell us what the universe should have looked like when it started-it would still be up to
  • 22. God to wind up the clockwork and choose how to start it off. so long as the uni- verse hãs a beginning, we could suppose it had a creator. But if the uni- verse is completely self-contained. having no boundary or edge' it would have neither beginning nor end: it would simply be. what place then for a creator?8 So the new physics does not have to lead to theology after all. Some of us who are skeptical about religious matters have to admit. however, that recent developments in astrophysics (unlike those in evolutionary nation provided by quantum theory depends on the fact that in quantum physici 1¡e gqgleylevels-olpaftl5 and systems can never be pTgcise.ly the 108 Science andReligion biology) do not necessarily conflict with religion. Taken at face value,
  • 23. they might even seem to support it. Robert Jastrow. for example, reads "theological implications" out of (or into?) big bang cosmology. A pro- fessed agnostic, Jastrow nevertheless states in his popular book God and the Astronomers that the big bang theory appears to support the biblical doctrine of creation. Many astronomers, he says, would have preferred that the universe be eternal. Then there would be no need to posit a Creator who began the whole business. So to scientific skeptics the big bang theory came as a very unpleasant surprise. Jastrow thinks that theologians will all be delighted that science has now seemingly demonstrated that the universe had a beginning, while the agnostic astronomers will be very agitated: At this moment [as a result of big bang cosmology] it seems as though science will never be able to raise the curtain on the mystery of creation. For the scientist who has lived by his faith in the power of reason. the story ends like a bad dream. He has scaled the mountains of ignorance, he is about to conquer the highest peak; as he pulls himselfover the final rock, he is greeted by a band oftheologians who have been sitting there for centuries.e
  • 24. Not all of us, however, are happy with Jastrow's ironic interpretation of big bang physics. We might not go so far as to repeat Fred Hoyle's caustic comment that big bang cosmology was, after all, the brainchild of the Belgian astronomer Georges Lemaitre who was also a Roman Catholic priest. But we note with some disappointment that Arno Penzias, co-discoverer of the "smoking gun" cosmic background radia- tion, and an orthodox Jew, stated in a recent inferview in the New York Times: "The anomaly of the existence of the universe is abhorrent to physicists, and I can understand why: the universe should not have hap- pened. But it did."'o And we are puzzled that in the spring of 1992, Professor George Smoot, also a self-styled skeptic who directed the COBE project. could not resist alluding to what he thought might be "theological implications" in the new supporting evidence from the COBE project for the big bang theory.¡l Most of us skeptics are suspicious of dalliances with theology like those of Jastrow, Penzias and Smoot. It is simply inappropriate to draw theological conclusions from science. We shiver whenever we think of the long-term consequences of any religious sanctioning of scientific
  • 25. ideas. And although it may seem for the moment that big bang physics is smoothing over some of the friction between science and religion, we Was the (Jniverse Created? 109 know that science will continue to change. And if the big bang theory is eventually discarded as premature or inaccurate, then on what ground witl those theologians stand who now see it as a vindication of theism? II. Contrast we completely agree with our skeptical adversaries that big bang physics prwides no new ammunition for theology. The temptation to i.uO tn"åtogical implications directly out of exciting new cosmological discoveries is powerful, but for the sake of theology's well- being it should be resisted at all costs. unfortunately, the conflation of creation theology with big bang physics has proved to be irresistible even for some of the most prominent religious officials. For instance'
  • 26. in'195'1 Pope Pius XII suggèsted to an audience of scientists that the big bang the- ory no* provides solid suppon for the religious doctrine of creation. Such an uncritical endorsement-one that embarrassed even Lemaitre- - fully deserved the sarcastic remark of astronomer George camow that the papal stamp of approval now demonstrates the theory's "un- questionable truth'"r' our own strategy is to differentiate the theology of creation so sharply from scientihc cosmology that there will be no opportunity for the twô to clash. Our intent, as always, is to head off any potential con- flicts between science and theology. We have so much respect for both disciplines that we don't want them to compromise their integrity through superficial alliances, even if big bang theory seems to have *on th" Oay in science. We wish to protect for all future generations of believers the durability of our classic religious teaching about creation'' Consequently, we are not interested in fastening the plausibility
  • 27. of the u"n"rubl" doctrine of creation to anything so unsteady aS the ephemer- al ideas of contemPorarY PhYsics. In other words, we shall not allow ourselves to be seduced by big bang cosmology, even if the latter has a primafacie affinity with bibli- cal accounts of the world's beginnings. Theology and astrophysics are talking about two entirely different sets of truths, and the plausibility of the doitrine of creation depends in no way on the scientific vindication of big bang theory. If we learned tomorrow that the theory is scientifi- cally mistaken, we would not in the least be disturbed' The reason for our reserve should be obvious to the reader by now. /t is simply not the business of science to deal with ultimate questions' Hence, úig Uung physics can tell us nothing about what "creation" real-
  • 28. ll0 Science and Religion ly means in its religious depth. At the same time, it is not the task of religious accounts ofcreation to give us any details about the physical origins of the universê either. The stories in Genesis have nothing whatsoever to teach science about cosmic beginnings. And although big bang physics may be an interesting and scientifically fruitful way of depicting the origins of the material universe. this is a far cry from telling us anything about the real meaning of creation. What then is the doctrine of creation all abour? Our answer, pur in its briefest terms, is that creation is not so much about chronological beginnings as about the world's ontological dependency on God. Ideas about the big bang provide us with provocative scientific rheories con- cerning the birth of the present universe. but the doctrine of creation is about something much more momentous: why is there anything at all rather than nothing? Cosmologists look for a first cause, and we do not object to that; but creation theology is not so much concerned about temporal beginnings as about awakening us to the complete giftedness of all things, regardless of how (or even whether) they "began." Its pur- pose is to invite us to assume that most fundamentally religious
  • 29. of pos- tures, namely, gratitude for the very existence of the universe. Thus, nothing that astrophysics can tell us about the early universe will make its existence any more remarkable than it already is to a secure religious faith. Talking about cosmic beginnings does not bring us any closer to God, for the crucial point is not chronological origins but the naked existence of the cosmos. Even if science taught us every- thing there is to k¡ow about cosmic beginnings. we would still not have a "solution" to the encompassing mystery of the world's being. Moreover, it is not theologically essential that the universe even have had a beginning in time. For, whether it began in time or not, it would still require a transcendent grounding, religiously speaking, in order to sustain it in existence. Hawking completely misses this point in his cavalier suggestion that since the universe may have had no clear beginning, it therefore had no need for a Creator. The theology of cre- ation, as no less an authority than Thomas Aquinas insinuated, is not necessarily dependent on the supposition that the universe had a tem- poral beginning. Even an eternal universe could be the expression of the primordial love that we call God. By linking the idea of creation so
  • 30. closely to temporal beginnings Hawking duplicates the conflationist superficiality of fundamentalist crearionism and Enlightenmenr physi- co-theology, both of which try to make science do the job of religion, and vice versa. We repeat: creation is not about chronological be- Was the (Jniverse Created? 111 ginningssomuchasitisabouttheworld,sbeinggroundedcontinuous- ly in the graciousness of God. Theológian Keith ward clearly summarizes our position on this point: ...it is wholly inadequate to think of God having created the universe at some remote point of time-say, at the Big Bang-so that now the uni- verse goes on existing by its own power' This popular misconception' that "ihe creation" is tfté ¡rst moment of the spacetime universe' and that the universe continues by its own inherent power' wholly miscon- Strueseveryclassicaltheistictradition.Itisirrelevanttoadoctrineof
  • 31. creation ex nihilo whether the universe began or not; that the universe began was usually accepted because of a particular reading of Genesis l ' Thedoctrineofcreationexnihilosimplymaintainsthatthereis.nothin g otherlhanGodfromwhichtheuniverseismade,andthattheuniverseis otherthanGodandwhollydependentuponGodforitsexistence''3 - It follows also, therefore, that speculations from quantum theory about the spontaneous origins of the universe have no implications for the religious notion of creation either. Lackey's suggestion that the infi- nitely Jmall early universe could have erupted randomly out of the ..nothingness,, of a Vacuum matrix is not at all relevant to the issue of creation.Thereallyinterestingquestionis:whyaretherebeingsatall' includingvacuummatrices(whichLackeysuperficiallyanderro- neously equates with "nothing")? Incidentally, another word-trick skeptics sometimes use is to identi- fyaspure..nothingness''thehypotheticalinitial..perfectsymmetry''i
  • 32. n *r,i.ú opposite charges of primordial physical enriries originally can- celed each other out-mathematically and energetically. Then when this primordialstateofZerototalenergywas..broken,''thecosmosissaid to have arisen out of "nothing," therefore requiring no creator. It all just happened spontaneously, without any cause' Ho*"u",'inourviewitisinnosensejustifiablelogicallyoronto- logicallytoidentifyaquantumVacuumortheoriginalsymmetryof mathematic al ,,zerô,, with a ..nothingness" in any sense remotely resemblingÏheexnihiloofcreationtheology.Nomatterhowmathe- marically ithereal or physically subtle the initial cosmic conditions may seem to have been, metaphysically speaking they still enjoy some moãe of being. And it is the sheer being of things, regardless of how mathematicalequationsrepresentthem'thatevokesthetruesenseof religious wonder. Il2 Science and Religion In sum. no matter what the specific features of cosmic origins
  • 33. look like to physics, science.is not equipped to say anything about the deeper question as to why there is anything at all, or what the ultimate meaning of the universe might be. These fundamentally religious questions are not the same as the question of what caused the universe to appear out of the quantum vacuum or a perfect symmetry. Even if the universe did emerge "spontaneously" and without any determinable physical "cause," the relevant question has to do with the metaphysical fact of the world's "being," not with the interesting sequence of physical events that might or might not have triggered it. Tracing events back either to a first efficient cause, to a vacuum matrix, or to a spontaneously broken symmetry may be scientifically interesting, but it is by no means the same as asking about the ultimate ground of the world's being. Here we should point out also that Robert Jastrow, who regards big bang theory as a possible victory for the "theologians," shares with bib- lical literalists the questionable assumption that creation has more to do with beginnings than with ontological dependency. Missing from the "band of theologians" that Jastrow expects to be waiting on the other side of big bang mountain are those (including Thomas
  • 34. Aquinas) who maintain that even an eternally existing universe would not be incom- patible with its being grounded in a well-spring of divine creativity. Like many other scientific skeptics Jastrow simply takes for granted that all theologians are likely to be biblical literalists and that "cre- ation" is fundamentally about chronological "beginnings." It is this confusion that we wish to dispel. In fact, Jastrow is implicitly approving the very same, though highly questionable, theological method that conservative religious writers like Geisler and Anderson employ.'' It is that of forging a conflationist con- federacy between science and religion on the basis of what is currently considered the best of science. The problem with this kind of alliance, as we have repeatedly noted, is that it will fall to pieces as soon as the pre- vailing scientific theory itself proves defective or in need of revision. We should recall always that good science leaves its theories open to fal- sification. So any theological method that bases its conclusions directly on falsifiable scientific consensus, no matter how secure this consensus may seem to be at present, holds little promise for future relations between science and religion. Even though big bang theory
  • 35. appears to have ousted all conceivable cosmological alternatives, there is no guar- antee that it will hold up indefinitely. A permanently sound method of relating cosmology to theology has to dig deep beneath big bang theory Was the (Jniverse Created? 113 and into the perennial truths of metaphysics for more lasting founda- tions. Wecandrivehomethispointbylookingbrieflyatwhatinmodern times has been the fate of "physico-theology." This is a designation given by Immanuel Kant to those forms of theology that based them- selves squarely on physics' In the early modern period' for example' Newton'; ideas fostered physico-theology by making the world- machine the primary reason for invoking the idea of God as its divine mechanic. Prominent theologians followed Newton, reasoning that the- ism had at last hit upon a solid intellectual foundation in the certainties
  • 36. of physics. The "book of nature" even seemed to be a more certain road to God than the Bible itself' A bit later, howeve¡ materialist thinkers like Diderot convincingly argued that physics required nothing other than natural principles to "*ptuin itseli. It could provide its own grounding. Having no further ,.oi. ro play, therefore. theology became an intellectual orphan. It is no ' "*ugg.ìuti,on to say that theology's taking physics rather than religious "*pãIi"n"" as its loundation helped lead eventually to the spread of iniellectual atheism and to the comparatively low standing the disci- pline of theology still has in our modern universities. More than once conflation has proven to be theologically disastrous'15 Today,whilemostacademictheologianshavenouseforphysico- theology, ironically some scientists are attempting to revive it'
  • 37. One "*u*piã is the physicist Paul Davies, who constructs his ideas about God iuite direcily out of the discoveries of physics.'ó Though Davies has litìle use for religious ideas of God, he thinks good science leads us to the notion of a ðreating and designing deity' A more recent' and muchmorebizarre,"*u*pl"ofphysico-theologyisthatprovidedby the respecred Tulane physicist Frank Tipler. In his latest book Î/ze physici of Immortaliry he argues with utter seriousness that theology is now a branch of physics. Religion's promises about eternal survival of death,heclaims,.unno*besubstantiatedmuchmorecompellinglyby physicsthanbytheologyalone.Scienceitselfcannowgiveusmathe- máticat certainty that we will all be raised from the dead to live forever' And not only that: it can also lead us to absolute certainty about the existenceofGod.Inthelightofphysicsthereisnomoreneedforreve- lation and faith.''
  • 38. Manytheologians'however,wouldrespondtosucheffortsby emphasizingthatany..God''arrivedatthroughsciencealonewouldbe only un absiraction, not the God of Moses or Jesus or Muhammad. To 1t4 Science and Religion read the God of religion directly out of the theories of physicists will eventually lead to conflict rather than cooperation between science and religion. We must seek a more durable theological approach than that of conflation. III. Contact Once again the contrast approach provides a clear alternative to the unfortunate commingling of religious and scientific ideas that generates conflict. It rightly resists the strong temptation to identify the big bang with divine creation. However, its severe compartmentalizing of cos- mology on the one hand, and the religious teaching about creation on the other, unnecessarily suppresses the prospect of fruitful dialogue. We would argue. as usual, that cosmology always has theological implica- tions. If the latter are not made explicit they nevertheless
  • 39. remain implic- itly effective in shaping our religious ideas. It seems more honest, there- fore, to expose them to the light of day. We need to be very cautious in doing so, of course, since science is always changing (as is religion too in its own way). But current scientific theory is never completely irrele- vant to theology. So we should at least look for points of "contact" between big bang cosmology and creation theology. We do not want to make the same mistakes theology made in the past by basing itself directly on physics. Physico-theology, we agree, has apparently left theology somewhat stranded in the modern intellectual world. But immunizing theology completely against what is going on in science is no less fatal to its intellectual integrity. Theology cannot help but think about God in terms of some cosmology. And today big bang theory, along with all the other things that relativity and quantum physics are implying about our world, must be taken into account when theologians talk about God's relation to the world. Although we do not wish to base our creation faith directly on scientific ideas, our reserve does not mean that big bang cosmology is theologically irrelevant.
  • 40. One of the immediate consequences of big bang theory for theology is that at the very least it forces us to take Íhe cosmos into account once again in our religious thought. It might seem strange that we make an issue of this obvious point. but the sad fact is that the natural world has not been a major concern of modern theology. Even though our creed emphasizes that God is the "Creator of the heavens and the earth," our religious life and practice seem lately to have glossed over this teach- ing.'' Theology has been so preoccupied with questions about human Was the (Jniverse Created? 115 existence that it has often left out the fact of our being linked to a much larger universe. This is nor completely surprising, for in modern thought since Immanuel Kant (1724-1804) the universe as an object of theological and philosophical interest had already faded into the background. As far as Kant was concerned, the universe existed only as a kind of construct of the human mind. It was a background notion, not a real, conerete set
  • 41. of interconnected finite things that could be made the object of formal study itself. Thus for the last couple of centuries, especially as the result of fantian influence, the universe was virtually lost to philosophy and theology, both of which became onesidedly subjective and anthropocen- tric. Itii especially out of Kantian ideas, we must also note' that much of the contrasiers'approach to theology was born and nurtured. ' However, as stanley Jaki astutely claims, recent scientific cosmology surting with Einstein has "restored to the universe that intellectual ."rp".tubility which Kant had denied to it."'n we can now study the uni- -veÀe more direcrly, rather than making it only the backdrop of more specific areas of inquiry. The new cosmology, therefore, is theologically cànsequential simply by virtue of the fact that it brings the universe to
  • 42. the fore once again. The universe implied by Einstein's theory of general relativity and big bang cosmology is no longerjust a vague background for our scien- tiñc oi theological pursuits, but instead-and notwithstanding its unfathomable enormily-a bounded and limited set of things. It is nei- ther eternal nor necessary, but radically finite. But if the universe is finite, this can only mean, as far as we are concerned, that it is contin-- gent. Andif it is contingent, this at least opens up the possibility that we lay need to go beyond the world itself in order to explain why it does exist at all. Let us unfold this idea a bit further' Tosaythatsomethingiscontingentmeansthatthereisnonecessity tbr its having come into existence at all-or for its being the way it is- as there *uy huu" been if matter were eternal or infinite' this particular universe, even science now seems to impty, need not be here. But since it is here, the question legitimately arises as fo why it exists if it did not have to. And once we have asked this question we have already
  • 43. brought science into close contact with theology' We can no longer say, as the contrasters do, that big bang cosmology is theologically unimportant. For the new scientific vision of the cos- moscompelsustou'kinudramaticallynewwaytheoldestquestionof all: why does the universe exist anyway? lt is no longer as easy as it 116 Science andReligion was earlier in modern intellectual history for cosmologists to separate "how" questions from "why" questions, as the contrasters would prefer that they do. And once the "why" questions arise, there is no good rea- son to exclude theology any longer from intimate conversation with science. After all, the theology of creation understandably maintains that rhe- ism provides the most straightforward and uncomplicated answer to the question: "why does the universe exist at all when there is no necessity that it do so?" And even though the question as to why the world exists arises quite independently of big bang cosmology and general relativi-
  • 44. ty, the fact that today it arises so explicitly our of scientific cosmology inevitably places the latter in a context where close encounter with the- ology seems wholly appropriate. Therefore, although we do not run to embrace the extravagant pro- posals by Robert Jasrrow and other scientists that big bang cosmology may have finally bridged rhe worlds of the Bible and science, neirher do we dismiss their overtures as though they were completely point- less. For beneath their efforts to connect the worlds of science and reli- gion we detect strains of an irrepressible sense of awe at the sheer fac- ticity or "thatness" of the universe. Even Steven Hawking seems to hint at times at the need for some metaphysical principle that would "breathe fire" into the abstract mathematics of physics and make this into an actual, concrete universe.?') It is not difficult to pick up the theo- logical concern in some of his writings, even when he p."s"nts himself as a skeptic. wonder at the f'act that the universe exists at all has been given a powerful boost by current cosmology. And since creation faith is insep- arable from this same sense of wonder at the mystery of being, theolo- gians cannot be indifferent to the new scientific developments.
  • 45. while remaining careful about easy liaisons, we can nonetheless be excited that science itself is causing a new wave of what paul rillich called "ontological shock," the feeling of being awestruck by the sheer exis- tence of that which need not have come into existence at all.?' And there are still other interesting consequences of theology's con- tact with big bang theory. For example, to a degree that previous theol- ogy could not have noticed so clearly, the new cosmology presents us with a world still in the making. put otherwise, the creation of rhe cos- mos appears far from finished. Especially as a result of its encounter with evolutionary science, but now also with big bang cosmology, the- ology today has developed a much deeper sense than ever before that Was the Universe Created? ll7 creation is far from being a finished product. The universe still surges toward the engendering of ever more novelty and diversity; and we humans are caught up in this ongoing creation (though unfortunately our species also seems intent upon wiping out much of the cosmic beauty that has preceded us in evolution). When combined with biological notions of evolution, big bang
  • 46. cos- mology helps us realize that creation is perpetually new every day. The idea that "creation" is only an originating moment confined to the remote past detracts from the full religious meaning of the term. Jesuit paleontologist Teilhard de Chardin, for example, rejects such a thought as "unbearable": The fact is that creation has never stopped. The creative act is one huge continual gesture, drawn out over the totality of time. It is still going on; and incessantly even if imperceptibly. the world is constantly emerging a little farther above nothingness.2? This admittedly lyrical declaration sums up the sentiments of a growing number of religious thinkers who have taken seriously the idea of cosmic expansion and evolution beginning with the big bang. It cannot be a matter of indifference to theologians that the universe has probably not existed forever and that it is therefore still in the process of becoming something quite other than what it has been. The big bang, even according to scientists, is not something that is over and done with. /¡ is still happening. This brings the fact of creation much more intimately into the immediate present, and it opens up the future before
  • 47. us in a restorative manner. The event of divine creation is going on within us, beneath us, behind us. and ahead of us. We agree with the contrasters that locating God's creativity only in the past easily leads straight to deism-and eventually to atheism. But a theology of "contact" is still excited about a cosmos that probably began in a singularity, for such an origin helps to dispel the idea of a static, eternal and necessary universe and replaces it with an exciting unfinished world-in-process. It does make a difference theolog- ically if the universe had a beginning, for such a universe seems much more open to new creation than one that is infinitely old. Consequently, the idea ofa big bang rules out any "eternal return of the same." This is the honifying notion (articulated especially by Friedrich Nietzsche, 1844-1900) that if matter is eternal and unorigi- nated, everything must periodically be reconstituted in precisely the same way, so that there can never be a completely open future. 118 Science and Religion However, if the universe has a beginning, or at least a finite past, there is no possibility of eternal recurrence. Nature is open to
  • 48. continually surprising developments in the indeterminate future. According to big bang cosmology, with its implied notion of time's irreversibility, every occurrence is unrepeated and unrepeatable, and so there is always an opening for what our faith looks forward to as a "New Creation." Our hope in the promise of New Creation clearly meshes much more readi- ly with a big bang universe than it ever could with the eternal cosmocof the ancient philosophers or Nietzsche. Many of us would be thoroughly disappointed, we must admit, if science eventually forced us to aban- don the idea of a finite and unfinished universe. For that reason we can- not help but be excited by big bang cosmology.', Finally, we cannot avoid the observation that the scientific quest for beginnings, so abundantly evident in recent cosmology, is at some deep level of human existence inseparable from the nearly universar religious search for origins. As much as we might appreciate the contrasters' dis- tinctions between creation theology and big bang theory, our indomitably religious concern for the primordial cannot be completely disentangled from the scientific quest for cosmic origins. without collapsing one inro the other, we would suggest that much of the energy motivating
  • 49. science's look backward into our ultimate cosmic roots stems from the ineradica- bly mythic orientation of human consciousness. The scientific sense of "wonder" about cosmic origins is already incipiently religious, and we should be honest enough to admit it. Even though big bang theory is logically and rheologically distinguishable from the religious quest for the source of our being, the two are existen- tially inseparable. Though they diverge in rhe order of thought, they both flow concretely from a common human concern to discover our roots. We humans are forever haunted by origins. IV. Confirmation As you might expect, we shall advance the suggestion here that cre- ation faith is not only consistent with, but also inherently supportive of, science. Scientists are not always aware of how significantly the reli- gious doctrine of creation has assisred historically and logically in the development of their own discipline. But although we cannot be certain of it, a truly empirical method of doing science might never even have come about outside of a cultural and historical context that had been Was the (Jniverse Created? 119
  • 50. thoroughly imbued with the idea that the world is a contingent creation of God. To be more specific, the theological notion that the world was creat- ed_andisthereforeneithernecessarynoreternal-givesaStatureto empirical science that other ways of looking at the world do not. To unáerstand this point imagine, as some philosophers have actually be- lieved to be the case, that the universe exists eternally and necessarily. That is, suppose that the state of the natural world /ras to be just the way it is and "ould not have been different. Such universal necessity would in turnimplythateveryparticularthingintheuniverseisalsonecessarily the way ii is an¿ could not have been otherwise. But if this were the kind of universe we lived in, then empirical science would be essentially irrel- evant,foreveryfeaturcoftheuniversecouldintheorybededucedfrorn
  • 51. necessary first principles. Observation might be of some practical value in the short term, buiit would be cognitionally vacuous. For in principle at least we could logically and deductively reason to the nature of every ,aspect of the cosmos merely on the basis of an eternal cosmic inevitabili- - ,y. Th.." would be no need for empirical method, other than just to antic- ipateorconfirmwhatwecouldcometoknowthroughreasonalone.We would not have to examine the world's particulars inductively, the way science does, since we could arrive at an adequate understanding of everything on the basis of its relation to the overall necessity built into nature. In other words, there would be no need to look at the world to see whatitisactuallylike.Sciencewouldbefinallysuperfluous.
  • 52. creation theology, however, implies that the actually existing uni- verse is not n"""rrãry. [t need not have existed at all. and it need not have turned out exactly the way it has. Since its reality and its nature originate in the free deóision of the Creator, we cannot come to know it thrãugh pure deduction, as Greek philosophy allowed. Creation faith' thereflre, implicitly propels us on a journey of discovery to find out b),, observation*trat tt " wórld is like. Since it expels rigid necessity from our view of the universe, creation theology opens us up to the possibil- ityofbeingsurprisedbytheactualfacts.Itisespeciallyinanin- tálectual and cultural -ili"u molded by the creation theology of the God-religions that the empirical imperative of science. the injunction to attend to what *" u"tuuily experience, is explicitly confirmed.2o
  • 53. 208 Science and Religion The Cosmic Adventure (New York: Paulist Press, 1984), andThe Promise of Nature (New York: Paulist Press, 1993). 14. See L. Charles Birch, Nature and God (Philadelphia: Wesrminster Press, 1965), p. 103. 15. The recent sciences of chaos and complexity, which will be discussed Iater, also raise serious questions about the exclusive role ofselection in evolu- tion's creativity. 16. Gerd Theissen, Bíblical Faith: An Evolutionary Approach. trans. by John Bowden (Philadelphia: Fortress Press, 1985). A similar proposal is gi/en by John Bowker in his book The Sense of God (Oxford: Oxford University Press, 1978), p. 151. 17. For a development of these ideas see John F. Haught, The Cosmic Adventure. 18. These ideas are elucidated especially by what is called "process theolo- gy." See John B. Cobb, Jr. and David Ray Griffin, Process Theology: An Introductory Expos ition (Philadelphia: Westminster Press, I 976).
  • 54. 19. See, for example, Ernst Benz, Evolution and Christian Hope (Garden City, N.Y.: Doubleday, 1966). 20. See Karl Rahner, 5.J., Hominization,traîs. by WJ. O'Hara (New York: Herder & Herder, 1965). 4.Is Life Reducible to Chemistry? l. Francis Crick,The Astonishing Hypothesis: The Scientific Searchfor the Soul (New York: Charles Scribner's Sons, 1994), p. 3. 2. Ibid., p.257. 3. E. F. Schumacher, A Guide for the Perplexed (New York: Harper Colophon Books, 1978). 4. Ken Wilber, Eye to Eye: The Quest for a New Paradigm (Garden City: Doubleday Anchor Books, 1983), p. 24. 5. Crick, p. 6. 6. For a purely "materialisf' account of life see Jacques Monod, Chance and Necessiry, ffans. by Austryn Vy'ainhouse (New York: Vintage Books, 1972); and, in addition to Crick's work, for an equally marerialisr auempr to explain "mind," see Daniel C. Dennett, Consciousness Explained (New York: Little, Brown, 1991). 7. See Ian Barbour, Religion in an Age of Science (New York:
  • 55. Harper & Roq 1990), p. 4. Barbour makes a similar distinction between methodological and metaphysical reductionism. 8. Crick, pp. 8-9. 9. It should be pointed out, however, that these three giants still remained theists themselves, and Newton curiously continued to dabble in occult sub- Notes 209 jects to the end ofhis life, fashioning in the process his own peculiar brand of theology. 10. Monod, p.123. ll. Francis H. c- crick, of Morecures and Men (Seattre: university of Washington Press, 1966), p. 10. 12. For a summary of the research see, for example, Jon Frankrin, Molecures of the Mind: The Brave New science of Molecular psychology (New york: Atheneum, 1987). 13. Dennett, p. 33. 14. E. o. wilson, sociobiology: The New synthesis (cambridge: Harva¡d university Press, 1975). For a critical discussion of wilson's genetic determin- ism see Robert wright, Three scientists and rheir Gods (New
  • 56. york: Times Books,1988),pp.113-92. i 15. See E. o. wilson, on Human Naîure (New york: Bantam Books, 1979), p.200. 16. Michael Ruse and E. o. wilson, "The Evolution of Ethics," in James E. Huchingson, ed., Religion and the Natural sciences (New york; Harcoun _BraceJovanovich, 1993), p. 310. 17. Crick, The Asrcnishing Hypothesís,p.257. I 8. Schumach er, A Guide for the perplexed, p. lg. 19. Following Ernest Gellner's expression, Huston smith discusses the "epistemology of control" in his book Beyond the post-Modern Mind (New York: Crossroad, 1982), pp.62-91. 20. Cited by Schumacher, pp. 5-6. 2l- See Michael Polanyi, personar Knowredge (New york Harper Torchbooks, 1964), and rhe Tacit Dimension (Garden city: Doubleday Anchor Books, 1967). 22. see the discussion in Harry prosch, Michael polanyi: A critical Exposition (Albany: Srare University of New york press, 19g6), pp. 124_34.
  • 57. 23. This analogy is suggesred by polanyi in The Tacit Dimension,pp. 3l-34. 24. See Michael Polanyi, Knowirg and Being, edited by Majorie Grene (Chicago: Universiry of Chicago press, 1969), pp.225'-39. 25. John Polkinghorne, The Faith of a physicisr (princeton: princeton University Press, 1994), p. 163. 26. Karl Jaspers refers to this as the "axial age" in The origin and Goal of History (New Haven: Yale University press, 1953). 5. Was the Universe Created? l. Peter w. Atkins, creation Revisited (New york: w H. Freeman, 1992). 2. within specific galactic clusters there may be local movement of bodies towa¡d each othe¡ but overall the galaxies move away from each other as space expands. 210 Science and Religion 3. Nevertheless, the "standard" big bang theory leaves some important sci- entific questions unansrvered. These have been addressed by the so-called "inflationary" cosmology which posits that most of the physicai conditions that
  • 58. define our present were not yet present in the initial .ondition, of the big bang, but became fixed only during an accelerated phase transition (inflation) strortty (billionths of a second) afrer the big bang. 4. on the other hand, such speculation may just as readily be the conse- quence of purely scientific attempts to interpret the equations of physics, and we may assume that in most cases there is no ideological influence at work. ' 5. This is rhe view of John R. Gribbin's In the Beginning: Afier coBE and Beþre the Big Bang (Boston: Little, Brown, 1993). 6. Norman J. Geisler and J. Kerby Anderson, in Huchingso n, ed., Rerigion and the Natural Sciences,p.202. 7. Douglas Lackey, "The Big Bang and the cosmorogical Argument,,'in Huchingson, ed., p. 194 (emphasis added). 8. Stephen Hawking, A Brief History of rime. pp. 140-4r. See arso paul Davies, The Mind of God: The scientific Basis for a Rational l4zorld (New york: Simon & Schuster, 1992), p.66. 9. Robert Jastrow, God and the Astronomers (New york: w.w. Norton and Co.), p. l16. 10. Quoted in Stanley L. Jaki, (Jniverse and creed (Milwaukee:
  • 59. Marquette University Press, 1992), p.54. I l. In his recent book, wrinkles in Time,howeve¡ smoot refers to himself as a "skeptic" as far as religion is concerned. 12. Timothy Ferns, coming of Age in the Milþ r/ay (New york: Doubleday, 1988),p.274- 13' Keith ward, "God as a principle of cosmorogical Expranation," in Robert Russell, Nancey Murphy and c. J. Isham. editon (Notre ùame: vatican observatory and university of Notre Dame press, 1993), pp. z4g- 4g.The cita- tion from ward is not intended to imply that he himself endorses the contrast approach. In fact he seems to fit more comfortably into the..contact" position. 14. See note #6 above. 15. This is the thesis of Michael J. Buckley, At the origins of Atheism (New Haven: Yale university Press, 1987); this is not ro imply, however, that Buckley himself subscribes in every respect to the "contrasi' ápproach, though it seems at times that he leans in that direction. 16. Paul Davies, God and the New physics (New york Simon & schuster, 1983); and rhe Mind of God: The scientific Basis for a Rational world (New
  • 60. York Simon & Schusrer, 1992). 17. Frank J. Tiplea The physics of Immortaliry (New york Doubleday, 1994). Since the main purpose of religion was always to satisfy our craving for eternal life, Tipler asks, why do we need it any longer if physics can now give us mathematical certainty that we will be raised from the dead to live forever? Notes 2ll Using general relativity, quantum cosmology, artificial intelligence, and a touch of Teilhard de chardin, he assures us that nature requires that intelligent life will survive forever. To those who reply that the sun will eventually inciner- ate the earth and its biosphere, Tipler argues that "life" in the form of artificial intelligence will inevitably have ventured far beyond our galaxy long before our planet disappears. we will have launched tiny self- replicating forms of information-processing that will eventually spread intelligent "life" to safer regions of the universe. In the end, this intelligent life (which ripler consistent- ly defines in terms of informational capacity) will "take control" of the entire cosmos. But suppose we live in a "closed" universe. that is, one destined for a final gravitational collapse at immense temperatures. won't the "big crunch" destroy
  • 61. life completely? Not at all, Tipler replies. chaos theory now allows that the uni- verse will not collapse at the same rate everywhere. So there will forever be some variation in temperature among different patches of the cosmos, and this differential will provide sufficient energy potential for indefinitely prolonged _information-processing. Billions of years from now there will finally emerge an..Omega point" com- prised of such extraordinary calculational competence that it will be able to bring us all back from the dead. It will do this through an ..emulation," i.e. a perfect computational simulation, of the partems that now give us our identity. Because each of us is ultimately reducible to bits of data, we can realistically expect that the informationally precocious omega-Point will process us back from the dead and into etemal life. How can this happen? Tipler answers that we are now imprinting sets of retrievable information about ourselves, however faintly, on a "light cone" that will extend indefinitely into the future of the cosmos. omega- point wilt be able to read this data and print us out in the flesh once again. Thus. Omega-point, a notion Tipler adapts from Teilhard. is very much like what theology calls "God," for he "exists necessarily," "loves us," and seeks to save
  • 62. us from absolute perishing. Tipler proclaims all of this while insisting that he is an atheist, a materialist, and a reductionist. His thoughts about Omega-God follow he says, not from the flimsy reports of religion, but from pure physics. We don't need, therefore, to participate any longer in the superfluous religious acts of prayer and wor- ship. The existence of "God" and the certainty of eternal life will be brought home to us clearly enough if we just follow the equations of physics. (This noæ is adapted from tÌ¡e author's review of Tipler's book in America,yol. 172, No. I (January, 1995),24-25. 18. Jaki, Universe and Creed,p.27. 19.Ibid. 20. Hawking, A Brief History of Tïme, p. 17 4. 212 Science and Religion 21. Paul rillich. systematic Theotogy, Vor. I (chicago: university of Chicago Press, 195 l), p. I 13. 22.Teilhard de chardìn. The prayer of the (Jniverse,(New york: Harper & Row. 1968), pp.120-21. 23. See. however, the discussion by c. J. Isham and J. c.
  • 63. porkinghorne, "The Debate over rhe Block Universe," in Russell, et al, ed., g)rantum Cosmology and the Laws of Narure,pp. 135-44 24. This point wilr be considerabry amplified in chapter 7 with its discus- sion of the new sciences of comprexity and chaos. See Michael roster. ..r[í christian Doctrine of creation and the Rise of Modern Natural science,,, Mind (1934),446-68. 6. Do We Belong llere? l. Some physicists even conjecture (perhaps wildry) that the universe becomes determinate only when it intersects with observers. 2. See the discussion by Rolston, pp.67_70. 3. This idea is said to have come from the physicist Leon Lederman. 4- For example, Alan Guth's inflationary cosmologicar hypothesis, which seems to settle many of the difficulties with srandard big bang iheory, is wide_ ly accepred even though, unlike rerativity theory, there is no úuy to iest it. See Alan Guth. "Inflationary universe." Encycropecria of cosmorlgy, edired by Norriss S. Hetheringron (New yor*: Garrand pubrishing, rnc., tg!¡), pp. 301- 22. 5. see especially John D. Barrow and Frank J. Tiprer, The
  • 64. Anthropic cosmological Principle (New york: oxford university press, r9g6). 6. Heinz Pagels. Perfect symmetry (New york: Banram Books, 19g6), pp. 377-78. 7. Perhaps. however. the inflationary hypothesis that came out of the early 1980's eliminates the need to pack so much into the initial cosmic conditions. Many of the remarkable coincidences that the sAp attributes to initial condi- tions could have come about by physical necessity during an ..inflationary epoch" only small fractions of a second after the big bang. See, for example, George Smoot, Wrinkles in Time (New york: William Morro* & Co., Inc., 1993), pp. 190-91. 8. John Gribbin. In the Beginning: After coBE antr Beþre the Big Bang (Boston: Little, Brown. 1993). 9. Smoot. Wrinkles inTime,p. l9l. 10. See the similar point made by Nichoras Lash, ..observation, Revelation, and the Posterity of Noah," in physics, phitosophy and rheotogy, edited by Robert J. Russell, et al (Notre Dame: universiiy of Notre Dame Press, 1988), p.211. 11. Gribbin, In the Beginning, pp. 249-53.
  • 65. Notes 2t3 12. This approach is especially characteristic of some forms of ..existential_ ist" theology, particularly those associated with Rudolf Bultmann and his fol_ lowers. 13. Moreover, in the final chapter of this book we shall point out that the SAP's connecting our existence so crosely to the physicar cosmos may have some bearing on the issue of ecology also. 14.The Quickening (Jniverse (New york: St. Martin's press, l9g7), p. xvii. 15. see Freeman Dyson, Infinite in Ail Directions (New york: Harper & Row,1988), p.298. 16. For development of this whiteheadian theme see the author's earlier book,The Cosmic Adventure (New york: paulisr press, l9g4). 7. Why Is There Complexity in Nature? l. Two of the best introductions to "chaos theory" are James Gleick, chaos: The Making of a New science (New york: Viking, l9g7) and stephen H' Kellert. In the wake of chaos (chicago: university of chicago press, '1993). The new science of "complexity" is summarizld in Roge-
  • 66. r Lewin, complexity: Life at the Edge of chaos (New york: Macmillan, r9é2) and M. Mitchell waldrop, complexity: The Emerging science at the Edge of order and Chaos (New York: Simon & Schusrer, 1992). 2. James- P. crutchfield, J. Doyne Farmer, Norman H. packard and Robert S. Shaq "chaos," scientific American (December, 19g6), pp. 3g- 49, cited by Arthur Peacocke, Theology for a scientific Age (cambridge: sasil Blackwell, 1990),p. a2. 3. see the books by waldrop and Lewin for numerous interviews with sci- entists who are now framing their questions in these interesting ways. 4. Forexamples of this line of thoughr see Lewin, pp. l6Z_6S. 5. See Alfred North whitehead, science and the Modern wortd (New York: The Free Press, 1961), p.9a. 6. See John T. Houghton, "A Note on chaotic Dynamics," science and christian Belief, Vol. l, p. 50. However, John polkinghome has expressed some doubts about the significance of such quantum effects in the macro world: Reason and Realiry (SPCII Trinity press Inrernarional, I 99 I ), pp. g9_92. 7. The now classic example of such skepticism is Jacques
  • 67. Monod's book Chance and Necessity, cited earlier. 8. These ideas, once again, have been articulated most fully and explicitly in process theology, but they are quite compatible with othei forms of reli- gious reflection as well. 9. John Polkinghome, The Faith of a physici.rr (princeton: princeron University Press, 1994), pp. 25-26, 7 5-g7 . 10' Stephen Jay Gould, Ever since Darwin (New york: w. w. Norton & company, 1977), p. 12. Recently, Gould has been acknowledging that natural 1 CSC 262 Programming in C++ II Sykes Day 18 22.1 Introduction to the Standard Template Library (STL) We’ve repeatedly emphasized the importance of software reuse. Recognizing that many data structures and algorithms are commonly used, the C++ standard committee added the Standard Template Library (STL) to the C++ Standard Library. The STL defines powerful, template-based, reusable components that implement many common data structures and algorithms used to process those data structures. 2
  • 68. 22.1 Introduction to the Standard Template Library (STL) (Cont.) As you’ll see, the STL was conceived and designed for performance and flexibility. This chapter introduces the STL and discusses its three key components—containers (popular templatized data structures), iterators and algorithms. The STL containers are data structures capable of storing objects of almost any data type (there are some restrictions). We’ll see that there are three styles of container classes—first- class containers, adapters and near containers. 3 4 22.1 Introduction to the Standard Template Library (STL)
  • 69. (Cont.) STL iterators, which have properties similar to those of pointers, are used by programs to manipulate the STL-container elements. In fact, standard arrays can be manipulated by STL algorithms, using standard pointers as iterators. We’ll see that manipulating containers with iterators is convenient and provides tremendous expressive power when combined with STL algorithms—in some cases, reducing many lines of code to a single statement. There are five categories of iterators, each of which we discuss in Section 22.1.2 and use throughout this chapter. 5 22.1 Introduction to the Standard Template Library (STL) (Cont.) STL algorithms are functions that perform such common data manipulations as searching, sorting and comparing elements (or entire containers). The STL provides approximately 70 algorithms. Most of them use iterators to access container elements. Each algorithm has minimum requirements for the types of iterators that can be used with it. We’ll see that each first-class container supports specific iterator types, some more powerful than others. A container’s supported iterator type determines whether the container can be used with a specific algorithm. 6
  • 70. 22.1 Introduction to the Standard Template Library (STL) (Cont.) Iterators encapsulate the mechanism used to access container elements. This encapsulation enables many of the STL algorithms to be applied to several containers without regard for the underlying container implementation. As long as a container’s iterators support the minimum requirements of the algorithm, then the algorithm can process that container’s elements. This also enables you to create new algorithms that can process the elements of multiple container types. 7 8 22.1 Introduction to the Standard Template Library (STL) (Cont.)
  • 71. In Chapter 20, we studied data structures. We built linked lists, queues, stacks and trees. We carefully wove link objects together with pointers. Pointer-based code is complex, and the slightest omission or oversight can lead to serious memory-access violations and memory-leak errors with no compiler complaints. Implementing additional data structures, such as deques, priority queues, sets and maps, requires substantial extra work. An advantage of the STL is that you can reuse the STL containers, iterators and algorithms to implement common data representations and manipulations. 9 10 11
  • 72. Iterators Recall: generalization of a pointer Typically even implemented with pointer! "Abstraction" of iterators Designed to hide details of implementation Provide uniform interface across different container classes Each container class has "own" iterator type Similar to how each data type has own pointer type 19-12 12 Manipulating Iterators Recall using overloaded operators: ++, --, ==, != * So if p is iterator variable, *p gives access to data pointed to by p Vector template class Has all above overloads Also has members begin() and end() c.begin();//Returns iterator for 1st item in c c.end();//Returns "test" value for end 19-13 13 Cycling with Iterators Recall cycling ability:
  • 73. for (p=c.begin();p!=c.end();p++) process *p//*p is current data item Big picture so far… Keep in mind: Each container type in STL has own iterator types Even though they’re all used similarly 19-14 14 Display 19.1 Iterators Used with a Vector (1 of 2) 19-15 1//Program to demonstrate STL iterators. 2#include <iostream> 3#include <vector> 4using std::cout; 5using std::endl; 6using std::vector; 7int main( ) 8{ 9 vector<int> container; 10 for (int i = 1; i <= 4; i++) 11 container.push_back(i); 12 cout << "Here is what is in the container:n"; 13 vector<int>::iterator p; 14 for (p = container.begin( ); p != container.end( ); p++) 15 cout << *p << " "; 16 cout << endl; 17 cout << "Setting entries to 0:n";
  • 74. 18 for (p = container.begin( ); p != container.end( ); p++) 19 *p = 0; 15 Display 19.1 Iterators Used with a Vector (2 of 2) 19-16 20 cout << "Container now contains:n"; 21 for (p = container.begin( ); p != container.end( ); p++) 22 cout << *p << " "; 23 cout << endl; 24 return 0; 25} Sample Dialogue Here is what is in the container: 1 2 3 4 Setting entries to 0: Container now contains: 0 0 0 0 16 Vector Iterator Types Iterators for vectors of ints are of type: std::vector<int>::iterator Iterators for lists of ints are of type: std::list<int>::iterator
  • 75. Vector is in std namespace, so need: using std::vector<int>::iterator; 19-17 17 Kinds of Iterators Vector iterators Most "general" form All operations work with vector iterators Vector container great for iterator examples 19-18 18 Random Access: Display 19.2 Bidirectional and Random-Access Iterator Use 19-19 19 Iterator Classifications Forward iterators: ++ works on iterator Bidirectional iterators: Both ++ and – work on iterator (“--“) Random-access iterators:
  • 76. ++, --, and random access all work with iterator These are "kinds" of iterators, not types! 19-20 20 Constant and Mutable Iterators Dereferencing operator’s behavior dictates Constant iterator: * produces read-only version of element Can use *p to assign to variable or output, but cannot change element in container E.g., *p = <anything>; is illegal Mutable iterator: *p can be assigned value Changes corresponding element in container i.e.: *p returns an lvalue 19-21 21 Reverse Iterators To cycle elements in reverse order Requires container with bidirectional iterators Might consider: iterator p; for (p=container.end();p!=container.begin(); p--) cout << *p << " " ; But recall: end() is just "sentinel", begin() not! Might work on some systems, but not most 19-22
  • 77. 22 Reverse Iterators Correct To correctly cycle elements in reverse order: reverse_iterator p; for (rp=container.rbegin();rp!=container.rend(); rp++) cout << *rp << " " ; rbegin() Returns iterator at last element rend() Returns sentinel "end" marker 19-23 23 Compiler Problems Some compilers problematic with iterator declarations Consider our usage: using std::vector<char>::iterator; … iterator p; Alternatively: std::vector<char>::iterator p; And others… Try various forms if compiler problematic 19-24
  • 78. 24 22.1.2 Introduction to Iterators (Cont.) STL first-class containers provide member functions begin and end. Function begin returns an iterator pointing to the first element of the container. Function end returns an iterator pointing to the first element past the end of the container (an element that doesn’t exist). 25 22.1.2 Introduction to Iterators (Cont.) If iterator i points to a particular element, then ++i points to the “next” element and *i refers to the element pointed to by i. The iterator resulting from end is typically used in an equality or inequality comparison to determine whether the “moving iterator” (i in this case) has reached the end of the container. An object of type iterator refers to a container element that can be modified. An object of type const_iterator refers to a container element that cannot be modified. 26 22.1.2 Introduction to Iterators (Cont.)
  • 79. Figure 22.9 shows the predefined iterator typedefs that are found in the class definitions of the STL containers. Not every typedef is defined for every container. We use const versions of the iterators for traversing read-only containers. We use reverse iterators to traverse containers in the reverse direction. 27 28 29 22.1.2 Introduction to Iterators (Cont.) Figure 22.10 shows some operations that can be performed on each iterator type.
  • 80. The operations for each iterator type include all operations preceding that type in the figure. 30 31 32 33
  • 81. 34 35 36 22.1.2 Introduction to Iterators (Cont.) Figure 22.6 shows the categories of STL iterators. Each category provides a specific set of functionality. Figure 22.7 illustrates the hierarchy of iterator categories. As you follow the hierarchy from top to bottom, each iterator category supports all the functionality of the categories above it in the figure. Thus the “weakest” iterator types are at the top and the most
  • 82. powerful one is at the bottom. Note that this is not an inheritance hierarchy. 37 38 39 40
  • 83. Containers Container classes in STL Different kinds of data structures Like lists, queues, stacks Each is template class with parameter for particular data type to be stored e.g., Lists of ints, doubles or myClass types Each has own iterators One might have bidirectional, another might just have forward iterators But all operators and members have same meaning 19-41 41 22.1.1 Introduction to Containers The STL container types are shown in Fig. 22.1. The containers are divided into three major categories— sequence containers, associative containers and container adapters. 42 43
  • 84. 44 22.1.1 Introduction to Containers (Cont.) The sequence containers represent linear data structures, such as vectors and linked lists. Associative containers are nonlinear containers that typically can locate elements stored in the containers quickly. Such containers can store sets of values or key/value pairs. The sequence containers and associative containers are collectively referred to as the first-class containers. As we saw in Chapter 20, stacks and queues actually are constrained versions of sequential containers. For this reason, STL implements stacks and queues as container adapters that enable a program to view a sequential container in a constrained manner. 45 22.1.1 Introduction to Containers (Cont.) There are other container types that are considered “near
  • 85. containers”—C-like pointer-based arrays (discussed in Chapter 7), bitsets for maintaining sets of flag values and val- arrays for performing high-speed mathematical vector operations (this last class is optimized for computation performance and is not as flexible as the first-class containers). These types are considered “near containers” because they exhibit capabilities similar to those of the first-class containers, but do not support all the first-class-container capabilities. Type string (discussed in Chapter 18) supports the same functionality as a sequence container, but stores only character data. 46 22.1.2 Introduction to Iterators (Cont.) The iterator category that each container supports determines whether that container can be used with specific algorithms in the STL. Containers that support random-access iterators can be used with all algorithms in the STL. As we’ll see, pointers into arrays can be used in place of iterators in most STL algorithms, including those that require random-access iterators. Figure 22.8 shows the iterator category of each of the STL containers. The first-class containers (vectors, deques, lists, sets, multisets, maps and multimaps), strings and arrays are all traversable with iterators. 47
  • 86. 48 22.1.1 Introduction to Containers (Cont.) Most STL containers provide similar functionality. Many generic operations, such as member function size, apply to all containers, and other operations apply to subsets of similar containers. This encourages extensibility of the STL with new classes. Figure 22.2 describes the functions common to all Standard Library containers. [Note: Overloaded operators operator<, operator<=, operator>, operator>=, operator== and operator!= are not provided for priority_queues.] 49 50
  • 87. 51 52 22.1.1 Introduction to Containers (Cont.) The header files for each of the Standard Library containers are shown in Fig. 22.3. The contents of these header files are all in namespace std. 53
  • 88. 54 22.1.1 Introduction to Containers (Cont.) Figure 22.4 shows the common typedefs (to create synonyms or aliases for lengthy type names) found in first-class containers. These typedefs are used in generic declarations of variables, parameters to functions and return values from functions. For example, value_type in each container is always a typedef that represents the type of value stored in the container. 55 56 57
  • 89. 58 59 22.1.1 Introduction to Containers (Cont.) When preparing to use an STL container, it’s important to ensure that the type of element being stored in the container supports a minimum set of functionality. When an element is inserted into a container, a copy of that element is made. For this reason, the element type should provide its own copy constructor and assignment operator. [Note: This is required only if default memberwise copy and default memberwise assignment do not perform proper copy and assignment operations for the element type.] Also, the associative containers and many algorithms require
  • 90. elements to be compared. For this reason, the element type should provide an equality operator (==) and a less-than operator (<). 60 61 Sequential Containers Arranges list data 1st element, next element, … to last element Linked list is sequential container Earlier linked lists were "singly linked lists" One link per node STL has no "singly linked list" Only "doubly linked list": template class list 19-62 62 Display 19.4 Two Kinds of Lists
  • 91. 19-63 63 Display 19.5 Using the list Template Class(1 of 2) 19-64 1//Program to demonstrate the STL template class list. 2#include <iostream> 3#include <list> 4using std::cout; 5using std::endl; 6using std::list; 7int main( ) 8{ 9 list<int> listObject; 10 for (int i = 1; i <= 3; i++) 11 listObject.push_back(i); 12 cout << "List contains:n"; 13 list<int>::iterator iter; 14 for (iter = listObject.begin( ); iter != listObject.end( ); iter++) 15 cout << *iter << " "; 16 cout << endl; 64 Display 19.5
  • 92. Using the list Template Class(2 of 2) 19-65 17 cout << "Setting all entries to 0:n"; 18 for (iter = listObject.begin( ); iter != listObject.end( ); iter++) 19 *iter = 0; 20 cout << "List now contains:n"; 21 for (iter = listObject.begin( ); iter != listObject.end( ); iter++) 22 cout << *iter << " "; 23 cout << endl; 24 return 0; 25} SAMPLE DIALOGUE List contains: 1 2 3 Setting all entries to 0: List now contains: 0 0 0 65 Associative Containers Associative container: simple database Store data Each data item has key Example: data: employee’s record as struct key: employee’s SSN Items retrieved based on key
  • 93. 19-66 66 22.3 Associative Containers The STL’s associative containers provide direct access to store and retrieve elements via keys (often called search keys). The four associative containers are multiset, set, multimap and map. Each associative container maintains its keys in sorted order. Iterating through an associative container traverses it in the sort order for that container. Classes multiset and set provide operations for manipulating sets of values where the values are the keys—there is not a separate value associated with each key. The primary difference between a multiset and a set is that a multiset allows duplicate keys and a set does not. 67 22.3 Associative Containers (Cont.) Classes multimap and map provide operations for manipulating values associated with keys (these values are sometimes referred to as mapped values). The primary difference between a multimap and a map is that a multimap allows duplicate keys with associated values to be stored and a map allows only unique keys with associated values. In addition to the common member functions of all containers
  • 94. presented in Fig. 22.2, all associative containers also support several other member functions, including find, lower_bound, upper_bound and count. Examples of each of the associative containers and the common associative container member functions are presented in the next several subsections. 68 set Template Class Simplest container possible Stores elements without repetition 1st insertion places element in set Each element is own key Capabilities: Add elements Delete elements Ask if element is in set 19-69 69 22.3.2 set Associative Container The set associative container is used for fast storage and retrieval of unique keys. The implementation of a set is identical to that of a multiset, except that a set must have unique keys. Therefore, if an attempt is made to insert a duplicate key into a set, the duplicate is ignored; because this is the intended
  • 95. mathematical behavior of a set, we do not identify it as a common programming error. A set supports bidirectional iterators (but not random-access iterators). Figure 22.20 demonstrates a set of doubles. Header file <set> must be included to use class set. 70 Program Using the set Template Class (1 of 2) 19-71 1//Program to demonstrate use of the set template class. 2#include <iostream> 3#include <set> 4using std::cout; 5using std::endl; 6using std::set; 7int main( ) 8{ 9 set<char> s; 10 s.insert(’A’); 11 s.insert(’D’); 12 s.insert(’D’); 13 s.insert(’C’); 14 s.insert(’C’); 15 s.insert(’B’); 16 cout << "The set contains:n"; 17 set<char>::const_iterator p;
  • 96. 18 for (p = s.begin( ); p != s.end( ); p++) 19 cout << *p << " "; 20 cout << endl; 71 Program Using the set Template Class (2 of 2) 19-72 21 cout << "Set contains 'C': "; 22 if (s.find('C')==s.end( )) 23 cout << " no " << endl; 24 else 26 cout << " yes " << endl; 27 cout << "Removing C.n"; 28 s.erase(’C’); 29 for (p = s.begin( ); p != s.end( ); p++) 30 cout << *p << " "; 31 cout << endl; 32 cout << "Set contains 'C': "; 33 if (s.find('C')==s.end( )) 34 cout << " no " << endl; 35 else 36 cout << " yes " << endl; 37 return 0; 38} SAMPLE DIALOGUE The set contains: A B C D
  • 97. Set contains 'C': yes Removing C. A B D Set contains 'C': no 72 Map Template Class A function given as set of ordered pairs For each value first, at most one value second in map Example map declaration: map<string, int> numberMap; Can use [ ] notation to access the map For both storage and retrieval Stores in sorted order, like set Second value can have no ordering impact 19-73 73 22.3.4 map Associative Container The map associative container performs fast storage and retrieval of unique keys and associated values. Duplicate keys are not allowed—a single value can be associated with each key. This is called a one-to-one mapping. For example, a company that uses unique employee numbers, such as 100, 200 and 300, might have a map that associates employee numbers with their telephone extensions—4321, 4115 and 5217, respectively.
  • 98. With a map you specify the key and get back the associated data quickly. A map is also known as an associative array. Providing the key in a map’s subscript operator [] locates the value associated with that key in the map. 74 Program Using the map Template Class (1 of 3) 19-75 1//Program to demonstrate use of the map template class. 2#include <iostream> 3 #include <map> 4#include <string> 5using std::cout; 6using std::endl; 7using std::map; 8using std::string; 9int main( ) 10{ 11 map<string, string> planets; 12 planets["Mercury"] = "Hot planet"; 13 planets["Venus"] = "Atmosphere of sulfuric acid"; 14 planets["Earth"] = "Home"; 15 planets["Mars"] = "The Red Planet"; 16 planets["Jupiter"] = "Largest planet in our solar system"; 17 planets["Saturn"] = "Has rings"; 18 planets["Uranus"] = "Tilts on its side"; 19 planets["Neptune"] = "1500 mile per hour winds";
  • 99. 20 planets["Pluto"] = "Dwarf planet"; 75 Program Using the map Template Class (2 of 3) 19-76 21 cout << "Entry for Mercury - " << planets["Mercury"] 22 << endl << endl; 23 if (planets.find("Mercury") != planets.end()) 24 cout << "Mercury is in the map." << endl; 25 if (planets.find("Ceres") == planets.end()) 26 cout << "Ceres is not in the map." << endl << endl; 27 cout << "Iterating through all planets: " << endl; 28 map<string, string>::const_iterator iter; 29 for (iter = planets.begin(); iter != planets.end(); iter++) 30 { 31 cout << iter->first << " - " << iter->second << endl; 32 } The iterator will output the map in order sorted by the key. In this case the output will be listed alphabetically by planet. 33 return 0; 34} 76 Program Using the map Template Class (3 of 3)
  • 100. 19-77 SAMPLE DIALOGUE Entry for Mercury - Hot planet Mercury is in the map. Ceres is not in the map. Iterating through all planets: Earth - Home Jupiter - Largest planet in our solar system Mars - The Red Planet Mercury - Hot planet Neptune - 1500 mile per hour winds Pluto - Dwarf planet Saturn - Has rings Uranus - Tilts on its side Venus - Atmosphere of sulfuric acid 77 Container Adapters stack and queue Container adapters are template classes Implemented "on top of" other classes Example: stack template class by default implemented on top of deque template class Buried in stack’s implementation is deque where all data resides Others: queue, priority_queue 19-78
  • 101. 78 Specifying Container Adapters Adapter template classes have "default" containers underneath But can specify different underlying container Examples: container Implementing Example: stack<int, vector<int>> Makes vector underlying container for stack 19-79 79 22.4 Container Adapters The STL provides three container adapters—stack, queue and priority_queue. Adapters are not first-class containers, because they do not provide the actual data-structure implementation in which elements can be stored and because adapters do not support iterators. The benefit of an adapter class is that you can choose an appropriate underlying data structure. All three adapter classes provide member functions push and pop that properly insert an element into each adapter data structure and properly remove an element from each adapter data structure. 80
  • 102. 22.4.1 stack Adapter Class stack enables insertions into and deletions from the underlying data structure at one end (commonly referred to as a last-in, first-out data structure). A stack can be implemented with any of the sequence containers: vector, list and deque. This example creates three integer stacks, using each of the sequence containers of the Standard Library as the underlying data structure to represent the stack. By default, a stack is implemented with a deque. 81 22.4.1 stack Adapter (Cont.) The stack operations are push to insert an element at the top of the stack (implemented by calling function push_back of the underlying container), pop to remove the top element of the stack (implemented by calling function pop_back of the underlying container), top to get a reference to the top element of the stack (implemented by calling function back of the underlying container), empty to determine whether the stack is empty (implemented by calling function empty of the underlying container) and size to get the number of elements in the stack (implemented by calling function size of the underlying container). 82
  • 103. 83 84 22.4.2 queue Adapter Class queue enables insertions at the back of the underlying data structure and deletions from the front (commonly referred to as a first-in, first-out data structure). A queue can be implemented with STL data structure list or deque. By default, a queue is implemented with a deque. 85
  • 104. 22.4.2 queue Adapter (Cont.) The common queue operations are push to insert an element at the back of the queue (implemented by calling function push_back of the underlying container), pop to remove the element at the front of the queue (implemented by calling function pop_front of the underlying container), front to get a reference to the first element in the queue (implemented by calling function front of the underlying container), back to get a reference to the last element in the queue (implemented by calling function back of the underlying container), empty to determine whether the queue is empty (implemented by calling function empty of the underlying container) and size to get the number of elements in the queue (implemented by calling function size of the underlying container). 86 87 88
  • 105. 22.4.3 priority_queue Adapter (Cont.) Class priority_queue provides functionality that enables insertions in sorted order into the underlying data structure and deletions from the front of the underlying data structure. A priority_queue can be implemented with STL sequence containers vector or deque. By default, a priority_queue is implemented with a vector as the underlying container. When elements are added to a priority_queue, they’re inserted in priority order, such that the highest-priority element (i.e., the largest value) will be the first element removed from the priority_queue. 89 22.4.3 priority_queue Adapter (Cont.) This is usually accomplished by arranging the elements in a binary tree structure called a heap that always maintains the largest value (i.e., highest-priority element) at the front of the data structure. We discuss the STL’s heap algorithms in Section 22.5.12. The comparison of elements is performed with comparator function object less< T > by default, but you can supply a different comparator.
  • 106. There are several common priority_queue operations. push inserts an element at the appropriate location based on priority order of the priority_queue (implemented by calling function push_back of the underlying container, then reordering the elements using heapsort). 90 22.4.3 priority_queue Adapter (Cont.) pop removes the highest-priority element of the priority_queue (implemented by calling function pop_back of the underlying container after removing the top element of the heap). top gets a reference to the top element of the priority_queue (implemented by calling function front of the underlying container). empty determines whether the priority_queue is empty (implemented by calling function empty of the underlying container). size gets the number of elements in the priority_queue (implemented by calling function size of the underlying container). 91 92
  • 107. 93 22.5 Algorithms Until the STL, class libraries of containers and algorithms were essentially incompatible among vendors. Early container libraries generally used inheritance and polymorphism, with the associated overhead of virtual function calls. Early libraries built the algorithms into the container classes as class behaviors. The STL separates the algorithms from the containers. This makes it much easier to add new algorithms. With the STL, the elements of containers are accessed through iterators. The next several subsections demonstrate many of the STL algorithms. 94