Brian Hayes. A reprint from. American Scientist. the magazine of Sigma Xi, the Scientific Research Society

Similar documents
A SECOND SOLUTION FOR THE RHIND PAPYRUS UNIT FRACTION DECOMPOSITIONS

8.5. Solving Equations II. Goal Solve equations by balancing.

SPH4U Transmission of Waves in One and Two Dimensions LoRusso

The structure of the Fibonacci numbers in the modular ring Z 5

number in a data set adds (or subtracts) that value to measures of center but does not affect measures of spread.

University of California, Los Angeles Department of Statistics. Measures of central tendency and variation Data display

Footwork is the foundation for a skilled basketball player, involving moves

THE LATENT DEMAND METHOD

THE EFFECTS OF COUPLED INDUCTORS IN PARALLEL INTERLEAVED BUCK CONVERTERS

GENETICS 101 GLOSSARY

Introduction to Algorithms 6.046J/18.401J/SMA5503

Precautions for Total Hip Replacement Patients Only

Equipment. Rackets are fragile. Handle the shuttlecocks carefully and only by their rubber tips.

Catenary Analysis and Calculation Method of Track Rope of Cargo Cableway with Multiple Loads

"The twisting movement of any hoof should, for physiological reasons, not be hindered by Shoeing." (Lungwitz 1884)

1. Write down the ideal gas law and define all its variable and parameters. 2. Calculate the values and units of the ideal gas law constant R.

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L: Computer Logic Design Fall Notes - Chapter 6.

SYMMETRY AND VARIABILITY OF VERTICAL GROUND REACTION FORCE AND CENTER OF PRESSURE IN ABLE-BODIED GAIT

Held under the sanction of USA Swimming, issued by North Carolina Swimming, Inc. Sanction No. NC11117

Available online at ScienceDirect. Procedia Engineering 113 (2015 )

When rule-based models need to count

Active Travel The Role of Self-Selection in Explaining the Effect of Built Environment on Active Travel

A Genetic Program for Breeding Racing Pigeons

ELIGIBILITY / LEVELS / VENUES

Headfirst Entry - Diving and Sliding

Sequential parimutuel games

MST 121: Supplementary resource material for Chapter A1, Sequences

ELIGIBILITY / LEVELS / VENUES

Basic Gas Spring Theory

ELIGIBILITY / LEVELS / VENUES

Load Calculation and Design of Roller Crowning of Truck Hub Bearing

ASSESSMENT SCORING SYSTEM OF ROAD SAFETY INFRASTRUCTURE

Research Article. Relative analysis of Taekwondo back kick skills biomechanics based on 3D photograph parsing. Mingming Guo

1 Bike MS: 2013 Proposal

ELIGIBILITY / LEVELS / VENUES

This report presents an assessment of existing and future parking & traffic requirements, for the site based on the current development proposal.

Seated valves (PN 16) VF 2-2-way valve, flange VF 3-3-way valve, flange

Human-Robot Interaction: Group Behavior Level

Lecture 13a: Chunks. Announcements. Announcements (III) Announcements (II) Project #3 Preview 4/18/18. Pipeline of NLP Tools

Intersleek Pro. Divers Manual. Our World is Water CONTENTS

The Complete Book of Offensive. Basketball Drills GAME-CHANGING DRILLS FROM AROUND THE WORLD GIORGIO GANDOLFI

Parsers. Introduction to Computational Linguistics: Parsing Algorithms. Ambiguity refresher. CFG refresher. Example: search space for top-down parser

Capacity of Shared-Short Lanes at Unsignalised Intersections

Chilled Mirror Dew Point Instrument

Obstacle Avoidance for Visually Impaired Using Auto-adaptive Thresholding on Kinect s Depth Image

draft final report NGSIM Arterial-Lane Selection Mode Federal Highway Administration Cambridge Systematics, Inc.

The Real Thing?: Representing the Bullfight and Spain in Death in the Afternoon by Peter Messent

ICC WORLD TWENTY ( WORLD CUP-2014 )- A CASE STUDY

Series 600 Accessories

Computation of the inviscid drift force caused by nonlinear waves on a submerged circular cylinder

Polynomial functions have graphs that are smooth and continuous. c) Use your knowledge of quadratic functions to sketch the graph.

MINNESOTA DEER MANAGEMENT

A Comparison of MOEA/D, NSGA II and SPEA2 Algorithms

» WYOMING s RIDE 2013

DAMAGE ASSESSMENT OF FIBRE ROPES FOR OFFSHORE MOORING

7.0 Nonmotorized Facilities

Real time lane departure warning system based on principal component analysis of grayscale distribution and risk evaluation model

CLASS: XI: MATHEMATICS

Policy sensitivity analysis of Karachi commuters

SPEED OF SOUND MEASUREMENTS IN GAS-MIXTURES AT VARYING COMPOSITION USING AN ULTRASONIC GAS FLOW METER WITH SILICON BASED TRANSDUCERS

ELIGIBILITY / LEVELS / VENUES

Welcome to the world of the Rube Goldberg!

Our club has a rich history that dates back to the turn of the 20th century.

Extensible Detection and Indexing of Highlight Events in Broadcasted Sports Video

The Analysis of Bullwhip Effect in Supply Chain Based on Strategic Alliance

TIME DOMAIN SIMULATIONS OF A COUPLED PARAMETRICALLY EXCITED ROLL RESPONSE IN REGULAR AND IRREGULAR HEAD SEAS

GFC NIST MASS FLOW CONTROLLERS. Typical Stainless Steel GFC Mass Flow Controller. Design Features. General Description. Principles of Operation

Field Studies Tom Habib, Barry Nobert, Eric Brownrigg, & Dr. Evelyn Merrill. University of Alberta 1 October 2009 Deer Tracks

Modeling Near-Shore Currents Induced by Irregular Breaking Wave

Introductory Rules of Officiating Small Sided Games Under 6 &Under 8 HANDBOOK

Maximizing. Potential in the 4x100 Relay. 4x100 - Entire Race. A Review of Relay Basics. NFHS Relay Zone Measurements

-H- Note. Flow control valve. Key features

Projection Based Data Depth Procedure with Application in Discriminant Analysis

AN ESTIMATION OF INTER-ZONAL BUS DEMAND ON COLOMBO - KALUTARA TRANSPORT CORRIDOR

DFC NIST DIGITAL MASS FLOW CONTROLLERS. DFC with optional LCD readout PROG RS485. Programmable Mass Flow Controller with Digital Signal Processing

The Prediction of Dynamic Strain in Leaf-Type Compressor Valves With Variable Mass and Stiffness

Endzone Sports Charities 1994 John Elway Throwback Jersey Research General Notes

Acta Geophysica vol. 57, no. 4, pp DOI: /s

Patrick Boston (Leeds University) and Mark Chapman (Edinburgh University)

BIKE MS 2013: TRAINING GUIDE

Don t just. ride, Bike MS. 2012: training guide. bike to create a world free of MS. BikeMS.org 1

Version IV: April a publication from

EXPERIMENTAL STUDY OF BREAKING WAVES OVER A SHOAL. Arun Chawla, H. Tuba Ozkan-Haller and James T. Kirby 1

n UL Listed and FM Approved for n Solenoid control n Quick pressure relief valve 73Q n Pressure sustaining & reducing valve 723

2) What s the Purpose of Your Project?

Comparison of Mathematical Approximation Methods for Mine Ventilation Network Analysis

Coal Pulveriser. Global Solutions

Characterization of Refrigeration System Compressor Performance

WATER VALVES REPLACEMENT PROJECT

GFC NIST MASS FLOW CONTROLLERS. Typical Stainless Steel GFC Mass Flow Controller. Design Features. General Description. Principles of Operation

WIND TUNNEL EXPERIMENT ON THE EFFECT OF WIND ON SMOKE EXHAUST SYSTEMS FOR A HIGH RISE BUILDING

A Data Envelopment Analysis Evaluation and Financial Resources Reallocation for Brazilian Olympic Sports

PERFORMANCE TEAM EVALUATION IN 2008 BEIJING OLYMPIC GAMES

P h o t o g r a p h i c L i g h t i n g ( 1 1 B )

Modelling Lane Changing Behaviour of Heavy Commercial Vehicles

1998 Plenary Session: Imaging Symposium

A Comparative Investigation of Reheat In Gas Turbine Cycles

» COLORADO s RIDE 2013

HERKIMER CENTRAL SCHOOL DISTRICT Herkimer Elementary School 255 Gros Boulevard Herkimer, New York 13350

Travel Demand Management Implementation in Bandar Lampung

Transcription:

COMPUTING SCIENCE HOW TO AVOID YOURSELF Bria Hayes A reprit from America Scietist the magazie of Sigma Xi, the Scietific Research Society Volume 86, Number 4 July August, 1998 pages 314 319 This reprit is provided for persoal ad ocommercial use. For ay other use, please sed a request to Permissios, America Scietist, P.O. Box 13975, Research Triagle Park, NC, 27709, U.S.A., or by electroic mail to perms@amsci.org. Etire cotets 1998 Bria Hayes.

COMPUTING SCIENCE HOW TO AVOID YOURSELF Bria Hayes Every Suday morig you go for a walk i the city, headig owhere i particular, with just oe rule to your ramblig: You ever retrace your steps or cross your ow path. If you have already walked alog a certai block or passed through a itersectio, you refuse to set foot there agai. This recipe for tracig a loopless path through a grid of city streets leads ito some surprisigly dark back alleys of mathematics ot to metio byways of physics, chemistry, computer sciece ad biology. Avoidig yourself, it turs out, is a hard problem. The exact aalysis of self-avoidig walks has stumped mathematicias for half a cetury; eve coutig the walks is a challege. My ow iitiatio ito the trials of self-avoidace came whe I bega experimetig with a simple model of the foldig of protei molecules, a story I told i a earlier Computig Sciece colum (see Hayes 1998). Protei foldig is close to the historical roots of the self-avoidig walk, which was first coceived as a tool for uderstadig the geometry of log-chai polymer molecules. A polymer writhig ad wrigglig i solutio forms a radom tagle radom, that is, except that o two atoms ca occupy the same positio at the same time. This excluded volume effect i the polymer is modeled by the walk s isistece o avoidig itself. Self-avoidig walks have also foud applicatios elsewhere i the scieces, such as the physics of magetic materials ad the study of phase trasitios. Ad they are of iterest as purely mathematical objects. May of the obvious questios about them have resisted rigorous aalysis, ad so the best aswers kow so far come from computer-itesive methods. All of the walks I shall describe here take place o a two-dimesioal square lattice, which is a grid of city streets reduced to its mathematical essece. The lattice cosists of all poits o the plae that have iteger x ad y coordiates. Walks begi at the origi, the poit with coordiates x=0 ad y=0. A sigle step always moves from the curret lattice site to oe Bria Hayes is a former editor of America Scietist. Address: 211 Dacia Aveue, Durham, NC 27701. Iteret: bhayes@amsci.org. of the four earest-eighbor sites. By covetio the legth of a walk,, is defied as the umber of steps, ad so the umber of lattice sites visited is +1. I Woder as I Wader I tryig to uderstad the self-avoidig walk, a good place to begi is with a walk that does t bother to avoid itself but lurches over the ladscape etirely at radom. At each step of such a walk you choose oe of the four eighborig lattice sites with equal probability, ad move there. If you repeat this process a few hudred times, ad draw a lie behid you as you go, the result is a scribble with a radom but oetheless distictive ad recogizable geometry. How may differet radom paths ca be traced o a square lattice? They are easy to cout. From ay fixed poit of origi there are just four walks cosistig of a sigle step, amely those goig oe uit orth, east, south or west. O the secod step each of these walks ca be cotiued i ay of four directios, ad so there are 16 two-step walks. For every further step the umber of walks is agai multiplied by 4, so that the umber of -step walks is 4. A iterestig questio to ask about radom walks is whether the walker ever returs to the startig poit. Eighty years ago George Pólya showed that the aswer depeds o the dimesioality of the lattice. I oe or two dimesios a radom walker is certai to come back home if the walk cotiues log eough. But three or more dimesios offer eough room to get lost i, ad a retur caot be guarateed o matter how log the walk goes o. Pólya s result immediately tells us somethig about self-avoidig walks o a two-dimesioal lattice. If a radom walk s probability of returig home is 1, the probability of ot revisitig the origi must be 0. Ad sice the origi is oe of the places that self-avoidig walks avoid, a arbitrarily log self-avoidig walk must be highly improbable so rare ad exceptioal that you have almost o chace of fidig oe. This scarcity is oe reaso self-avoidig walks are so hard to study. Ad yet, paradoxically, aother reaso is that they re so umerous it s a challege to cout them all. 314 America Scietist, Volume 86

radom walk oreversig walk self-avoidig walk Figure 1. Radom ad oreversig walks o the square lattice look very differet from a self-avoidig walk, which is ecessarily obrachig. Each walk cosists of 1,000 steps; the self-avoidig walk is show at reduced scale. Do t Look Back A itermediate stage betwee a purely radom walk ad a self-avoidig walk is the oreversig walk. As a recipe for a urba perambulatio, it allows you to go left, right or forward at each itersectio, but ot to make a U-tur ad go back the way you just came. Thus a oreversig walker o a square lattice has four choices for the first step, but oly three choices for each step thereafter. The umber of -step walks is 4 3 1, which for large coverges to 3. Typical examples of radom walks, oreversig walks ad self-avoidig walks ca be distiguished at a glace. The radom walk usually cosists of dese regios, where most of the lattice poits have bee visited at least oce, coected by tedrils through more sparsely settled territory. A trace of the walk looks somethig like a map of tows ad cities alog a river. The oreversig walk is similar but suggests a more ope ladscape perhaps suburba sprawl rather tha the city ceter. Ad the trace of a selfavoidig walk looks ot like cities alog a river but like the river itself, or like a coastlie. These differeces i appearace are reflected i quatitative measures of the walks geometry. Oe importat measure is the square of the distace betwee the ed poits of the walk. For - step radom walks the mea-squared displacemet is ; for oreversig walks it is 2. Self-avoidig walks are qualitatively differet. The mea-squared displacemet grows as a oliear fuctio of, which appears to be 3/2. There is aother importat differece betwee radom walks ad self-avoidig walks. Every radom walk ca go o forever; you ca always take oe more step. But a self-avoidig walk ca stumble ito a blid alley, gettig trapped at a lattice site where oe of the eighbors are uvisited. I other words, sometimes you ca t avoid yourself o matter how hard you try. O ay give step the probability of gettig boxed i is small a little less tha 1 percet but if you exted a walk idefiitely, it is certai to wader ito a dead ed evetually. This is aother way of sayig that self-avoidig walks are rare ad special; they have to beat the odds to survive. Coutig Your Steps Just how may distict -step self-avoidig walks ca you take o a square lattice? There is o simple exact formula, aalogous to the expressio 4 that eumerates radom walks, but upper ad lower bouds ca be stated. The umber of self-avoidig walks has to be less tha 3 because that is the umber of oreversig walks, which iclude the self-avoidig walks as a subset. Similarly, it s easy to costruct subsets of the self-avoidig walks whose umbers grow as 2 ; a example is the family of walks that move oly orth or east at each step. Thus the umber of -step self-avoidig walks should lie betwee 2 ad 3. Tighter bouds tha these have bee established, but still the oly kow way to get a exact tally is to actually trace out all the -step walks ad cout them. If you were asked to eumerate all the selfavoidig walks of, say, 15 steps, how would you aswer? Oe useful rejoider would be: Show me all the 14-step walks ad I ll costruct the 15- step oes. Addig the fial step to each walk is straightforward: Just try each of the four possible directios, acceptig a move if the eighborig site is vacat, ad otherwise rejectig it. The the questio becomes how do you geerate all the 14-step walks, ad of course the aswer is first to produce the 13-step walks. This regress cotiues back to the 0-step walk, which is just the sigle poit at the origi. The procedure is ucomplicated, but the coutig itself is arduous. There are 284 walks of five steps, ad 44,100 of 10 steps. By =15 the umber trapped! 1998 July August 315

0,2 i 1,2 2,2 0,1 1,1 2,1 0,0 1,0 2,0 e w e e s s r f r Figure 3. Symmetries reduce the umber of uique walks by a factor of early 8. Each of the five three-step paths i the leftmost colum is acted o by three rotatios ad four reflectios, yieldig 40 walks altogether; but for straight walks (first row) the effect of reflectio is the same as that of rotatio, reducig the total to 36 walks. l f r r l f r r l l f f l f r l f r f f r r l l f r l l f r l f r f f r r l l f f l f r Figure 4. Urooted walks have a additioal symmetry. The two walks at left would be idistiguishable if the dots markig the startig poits were erased. The walk at right is a palidrome, with a list of directios that reads the same i either directio. r l l f 2 0 2 Figure 2. Lattice walks ca be represeted as a list of x,y coordiates, as compass directios or as left, right ad forward commads. The last represetatio ca also be ecoded i a terary (base 3) umber. 2 1 1 0 of walks has reached 6,416,596, ad at =20 it is 897,697,164. The rate of growth is so steep ad reletless that merely fie-tuig a program to improve its efficiecy yields oly a paltry reward. Coutig the walks of +1 steps takes loger tha coutig all the walks from 1 through steps. Most of the records for coutig self-avoidig walks belog to A. J. Guttma ad his colleagues at the Uiversity of Melboure. As early as 1972 Guttma was part of a group (led by M. F. Sykes of the Uiversity of Lodo) that couted all walks of up to 24 steps. I 1987 Guttma raised the bar to 27 steps, the later to 29. Others the reached 30 ad 34 steps, ad Guttma s group wet o to 39. The i 1996, i a extraordiary feat of computig, A. R. Coway ad Guttma eumerated all the selfavoidig walks through = 51. There are 14,059,415,980,606,050,644,844 walks of 51 steps. Performig this computatio required a algorithm more sophisticated tha the oe sketched here, as well as a Itel Parago supercomputer that dedicated 1,024 processors ad 10 gigabytes of memory to the task. Guttma s log series of eumeratios yields a estimate of the asymptotic growth rate i the umber of walks the rate to which the series apparetly coverges i the limit of large. Based o the kow data, icreasig by 1 multiplies the umber of self-avoidig walks by about 2.638; i other words, the umber of -step walks is proportioal to 2.638. Eve though self-avoidig walks are so umerous we ca t cout ay but the shortest of them, they still remai rarities amog all possible lattice walks. At =20 fewer tha oe walk i 1,200 is self-avoidig. At =50, the ratio is oe out of 240 millio. Comig ad Goig If you look at a complete set of -step self-avoidig walks, the first thig you re likely to otice is a lot of repetitio. May of the walks have the same basic shape; they differ oly by a rotatio or reflectio. O the square lattice ay path ca be rotated ito four orietatios ad reflected across four axes (vertical, horizotal ad two diagoals). Should the results of these trasformatios be cosidered eight distict walks or eight variatios o a sigle walk? The aswer depeds o what you wat to do with the walks, but if you re merely coutig them, it s clearly foolish to cout by oes whe you ca cout by eights. Programs for walk coutig geerate just oe of the eight cofiguratios, ad the multiply to get the total umber. To elimiate the fourfold rotatioal symmetry of the lattice, you ca geerate oly those walks that start with a step i some particular directio, say east. The four mirror symmetries disappear if you cosider oly walks whose first tur after the iitial step is i oe specified directio, say orth. I this way the umber of walks to be couted is reduced to approximately oe-eighth the total umber. Why approximately? Because of oe small complicatio: A straight walk makes o turs away from its iitial directio ad is therefore left uchaged by mirror reflectio. Hece there are oly four distiguishable straight walks istead of eight, ad the total umber of walks is reduced by 4. I the symmetries described so far, walks are cosidered to be rooted, that is, oe ed of each walk is distiguished as the startig ed, as if it were plated i the groud. I may cotexts, however, the directio i which a walk is traversed has o sigificace. For example, if you were foldig a polymer alog the path of a selfavoidig walk, you could start at either ed of the 316 America Scietist, Volume 86

walk. Viewig self-avoidig walks as urooted paths makes may pairs of walks idistiguishable, so that the umber of distict -step walks is reduced by a further factor of approximately 2. I have bee uable to fid ay published literature o eumeratig urooted self-avoidig walks, although it seems ulikely I am the first to cosider the problem. The search for a practical algorithm proved a iterestig challege. For urooted walks, two paths through the lattice are idetical if traversig oe of them forward yields the same path as followig the other oe backward. The symmetry is easiest to uderstad whe you represet a walk ot as a list of lattice sites or as absolute directios but as istructios tellig you what turs to take at every itersectio alog the path. Suppose the route from your home to your office is abbreviated [l f r f f], where l stads for left, r for right ad f for forward. (The otatio is borrowed from the turtle graphics system of the Logo programmig laguage.) O your way home, if you wat to retrace your steps, you would obey the turtle-graphics commads [f f l f r]. The two lists of istructios are related by a trasformatio I shall call retroreflectio: The sequece of letters is reversed, ad all the lefts ad rights are iterchaged. I writig a program to eumerate the urooted self-avoidig walks, the aim is to select oe member of each retroreflected pair ad discard the other. (It does t matter which oe is kept.) The direct solutio would be to maitai a archive of all the walks see so far. The as you geerate each ew walk, you reverse the list of turtle-graphics commads, flip the lefts ad rights, ad compare the result with the archive of stored walks, keepig the ew walk oly if the retroreflected versio has t bee see already. This strategy would work, but it would be hideously slow ad a memory hog. There is a better way. The key idea is to trasform the list of turtle-graphics commads ito a umber, specifically a terary (base 3) umber, with the digit 0 represetig forward, 1 represetig left ad 2 represetig right. The every -step self-avoidig walk has a uique ecodig as a ( 1)-digit terary umber; equally importat, every ( 1)-digit terary umber specifies a - step oreversig (though ot ecessarily selfavoidig) walk. For example, coutig i terary from 0000, 0001, 0002, 0010 up to 2222 geerates every five-step oreversig walk. Discardig the walks that fail a test for self-itersectios leaves just the self-avoidig five-step walks. (I practice, it s better to write the walk umbers i balaced terary otatio, where the digits are 1, 0 ad +1; the iterchagig left ad right is just multiplyig by 1. Balaced terary is the oly umberig system I kow that has its ow Web page.) The reaso for treatig the walks as umbers is that it imposes a total orderig o them. Give ay two distict fiite umbers, there is always a urooted walks total self-avoidig walks 1 1 4 2 2 12 3 4 36 4 9 100 5 22 284 6 56 780 7 147 2,172 8 388 5,916 9 1,047 16,268 10 2,806 44,100 11 7,600 120,292 12 20,437 324,932 13 55,313 881,500 14 148,752 2,374,444 15 401,629 6,416,596 16 1,078,746 17,245,332 17 2,905,751 46,466,676 18 7,793,632 124,658,732 19 20,949,045 335,116,620 20 56,112,530 897,697,164 21 150,561,752 2,408,806,028 22 402,802,376 6,444,560,484 23 1,079,193,821 17,266,613,812 24 2,884,195,424 46,146,397,316 Figure 5. Exact eumeratios show the urooted walks are ot quite oe-sixteeth the rooted oes. larger ad a smaller. Likewise, give ay two distict walks related by the retroreflective symmetry, oe walk s terary ecodig must be less tha the other s. This immediately suggests a efficiet algorithm for splittig the symmetrical pairs: As you geerate each walk, compare the terary represetatio with its retroreflectio. If the origial umber is greater, discard the walk; otherwise keep it. I this scheme there is o eed to maitai ad search a archive of walks; every decisio is made with a sigle umerical compariso. Figure 5 gives the umber of urooted selfavoidig walks of up to 24 steps. As would be expected, the umbers are approximately oe-sixteeth the umber of all self-avoidig walks of the coectivity costat 2.8 2.6 2.4 2.2 rooted walks urooted walks 2.0 0 5 10 15 20 25 Figure 6. Coectivity costat measures the average umber of sites available to a walk ad determies the rate of growth i the umber of walks. The limitig value for large is believed to be about 2.638. 1998 July August 317

mea squared ed-to-ed displacemet 300 200 100 self-avoidig walks oreversig walks radom walks 0 0 10 20 30 40 50 Figure 7. Mea-squared ed-to-ed distace grows as a liear fuctio of for radom ad oreversig walks, but for self-avoidig walks seems to be equal to the 3/2 power of. same legth, ad the ratio approaches 1:16 more closely as icreases; ad yet the ratio is ot exact. The reaso is aother little complicatio, aalogous to the problem of straight walks that are ivariat uder reflectio. I this case a class of walks pass through retroreflectio uchaged. They are the palidromic walks. Cosider the path [f l f r f]; if you reverse the sequece of istructios ad iterchage lefts ad rights, you wid up with the same sequece of commads agai. The path is its ow retroreflectio. To get a correct cesus of the urooted walks it s crucial that such paths be couted oce ad oly oce. Radom Thoughts o Self-Avoidace Uless a ew algorithm comes alog, exhaustive eumeratios of self-avoidig walks seem ulikely to advace much beyod the curret limit of =51. Kowledge of loger walks has come maily from radom samplig. This process too is computatioally itesive. For most purposes, a radom sample is meat to be selected with uiform probability from the set of all -step self-avoidig walks. Ufortuately, the most obvious algorithm does ot yield walks with this distributio. It s easy eough to build a -step walk oe step at a time by choosig directios at radom; the questio is what to do if the walk collides with itself before reachig steps. The temptatio is simply to back up oe step ad try aother directio, but that practice leads to a biased sample of walks. To esure a fair sample you have to abado a failed walk etirely ad start over. My ow experimets with radom samplig have relied o the terary-umber represetatio. I choose a -digit balaced-terary umber at radom, the check the correspodig walk for self-itersectios. If the walk fails the test, I geerate a ew radom umber ad try agai. Algorithms like this oe readily produce large samples of 60- or 70-step walks, or smaller umbers of 100-step walks. As the walks get loger, however, the proportio of cadidates that pass the self-avoidace test declies sharply. At =100 you are proposig more tha 50,000 walks for every oe that turs out to be self-avoidig. At =200 the acceptable walks would be rarer tha oe i a billio. Other algorithms exted the rage of exploratio ito the thousads of steps. Thirty years ago Zeev Alexadrowicz of the Weizma Istitute of Sciece suggested a method called dimerizatio, which exploits a divide-ad-coquer strategy familiar i may other areas of computer sciece. Dimerizatio works because it s much easier to create two 50-step walks tha a sigle 100-step walk. You build the two shorter walks, ad strig them together ed-to-ed. Of course the two halfwalks may collide, i which case you have to start over, but failure turs out to be much less likely tha i the step-by-step techique. The procedure ca be ivoked recursively to build the 50-step walks from 25-step compoets, ad so o. What s particularly sweet about this algorithm is that it leds itself to a very simple ad trasparet implemetatio; I foud it easier to get right tha the less-efficiet step-by-step methods. Aother techique, called the pivot algorithm, also goes back 30 years; it was first described by Moti Lal of the Uilever Research Laboratory ad more recetly has bee refied ad exteded by Neal Madras of York Uiversity ad Ala D. Sokal of New York Uiversity. The pivot algorithm is quite differet from all the others described here. It does ot actually geerate a selfavoidig walk but istead takes oe walk ad trasforms it ito aother. The idea is to radomly choose a pivot poit somewhere alog the walk, ad the rotate or reflect or reverse the segmet o oe side of the pivot. If the result is a self-avoidig path, the move is accepted; otherwise you choose a ew pivot ad try agai. Successive walks i the sequece are highly correlated, but repeatig the trasformatio may times wipes out all memory of former cofiguratios. Rigorous Self-Avoidace Computatioal studies of self-avoidig walks have produced a rich harvest of empirical results. Theorems have bee harder to come by. For example, studies of the mea-squared ed-to-ed displacemet, based o both complete eumeratios ad o radom samples, strogly support the hypothesis metioed above that the displacemet grows as 3/2. Ideed, everyoe kows that this result is correct ad exact. But so far o oe has proved it; o oe has eve proved that the expoet must be greater tha 1 or less tha 2. Rigorous results o the coutig of self-avoidig walks are also scarce. The empirical evidece suggests that for large the umber of walks grows as 2.638, but this growth law has ot 318 America Scietist, Volume 86

bee explaied from first priciples. Util recetly, it was t eve certai that the umber of walks ivariably icreases as gets larger; because walks ca become trapped, it seemed possible that there might be some rage of values where there are fewer (+1)-step walks tha - step walks. I 1990, however, George L. O Brie proved that the series icreases mootoically. Eve if the asymptotic growth law is correct, however, it is oly a approximatio perhaps good eough for chemists ad physicists but ot wholly satisfyig to mathematicias. Ideally, oe would like a formula for calculatig the exact umber of walks for ay value of, without all the laborious coutig. Is that too much to ask? Most likely it is. Coway ad Guttma have give compellig argumets (though ot quite a proof) that o simple aalytic fuctio predicts the exact umber of self-avoidig walks. Perhaps the absece of such a fuctio tells us somethig importat about the ature of selfavoidig walks. The umber of walks is perfectly defiite ad kowable; there is othig radom or ucertai about the umber of ways to arrage a oitersectig path o a lattice. So why ca t we calculate it? I do t kow the aswer, but I would poit out that there are may objects i mathematics that exhibit the same curious mixture of determiism ad upredictability. The prime example is the prime umbers. Agai there is othig ucertai or statistical about what makes a umber prime, but if there is ay patter i the distributio of the primes, it remais totally iscrutable. As with the selfavoidig walks, there are good approximatios for the umber of primes, but o oe has foud (or expects to fid) a exact formula that will reliably poit to every prime. This stubbor resistace to total aalysis is part of what makes the primes iterestig. Perhaps self-avoidig walks belog i the same category of perpetually tatalizig mathematical structures. Bibliography Alexadrowicz, Z. 1969. Mote Carlo of chais with excluded volume: a way to evade sample attritio. Joural of Chemical Physics. 51:561 565. Allwright, James. Balaced Terary Web Pages. http:// castle.ecs.soto.ac.uk:8080/cgi-bi2/terary Coway, A. R., I. G. Etig ad A. J. Guttma. 1993. Algebraic techiques for eumeratig self-avoidig walks o the square lattice. Joural of Physics A: Mathematical ad Geeral Physics 26:1519 1534. Coway, A. R., ad A. J. Guttma. 1996. Square lattice self-avoidig walks ad correctios to scalig. Physical Review Letters 77:5284 5287. Domb, C., ad M. E. Fisher. 1958. O radom walks with restricted reversals. Proceedigs of the Cambridge Philosophical Society 54:48 59. Guttma, A. J., T. Prellberg ad A. L. Owczarek. 1993. O the symmetry classes of plaar self-avoidig walks. Joural of Physics A: Mathematical ad Geeral Physics 26:6615 6623. Guttma, A. J., ad Jia Wag. 1991. The extesio of self-avoidig radom walk series i two dimesios. Joural of Physics A: Mathematical ad Geeral Physics 24:3107 3109. Hayes, Bria. 1998. Computig Sciece: Prototeis. America Scietist 86:216 221. Hughes, Barry D. 1995. Radom Walks ad Radom Eviromets. Vol. 1: Radom Walks. Oxford: Claredo Press. Lal, Moti. 1969. Mote Carlo computer simulatio of chai molecules, I. Molecular Physics 17:57 64. Madras, Neal, ad Gordo Slade. 1993. The Self-Avoidig Walk. Bosto: Birkhäuser. Madras, Neal, ad Ala D. Sokal. 1988. The pivot algorithm: A highly efficiet Mote Carlo method for the self-avoidig walk. Joural of Statistical Physics 50:109 186. O Brie, George L. 1990. Mootoicity of the umber of self-avoidig walks. Joural of Statistical Physics 59:969 979. Slade, Gordo. 1994. Self-avoidig walks. The Mathematical Itelligecer 16(1):29 35. Slade, Gordo. 1996. Radom walks. America Scietist 84:146 153. Sykes, M. F. 1961. Some coutig theorems i the theory of the Isig model ad the excluded volume problem. Joural of Mathematical Physics 2:52 62. Wag, Jia. 1989. A ew algorithm to eumerate the selfavoidig radom walk. Joural of Physics A: Mathematical ad Geeral Physics 22:L969 L971. The text of this Computig Sciece colum ad liks to Iteret resources for further exploratio are available o the America Scietist Web site: http://www.amsci.org/amsci/ issues/comsci98/compsci1998-07.html Circle 27 o Reader Service Card 1998 July August 319