ArticleslgStudy

computer science

Self-avoiding walk

Self-avoiding walk is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Self-avoiding walk rather than just read about it. In short: In mathematics, a self-avoiding walk (SAW) is a sequence of moves on a lattice (a lattice path) that does not visit the same point more than once. This is a special case of the graph theoretical notion of a path.

Self-avoiding walk — main illustration
Self-avoiding walk — illustration

Key takeaways

  • Self-avoiding walk belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Self-avoiding walk to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Self-avoiding walk from memory before moving on to harder problems.

Reference excerpt

In mathematics, a self-avoiding walk (SAW) is a sequence of moves on a lattice (a lattice path) that does not visit the same point more than once. This is a special case of the graph theoretical notion of a path. A self-avoiding polygon (SAP) is a closed self-avoiding walk on a lattice. Very little is known rigorously about the self-avoiding walk from a mathematical perspective, although physicists have provided numerous conjectures that are believed to be true and are strongly supported by numerical simulations. In computational physics, a self-avoiding walk is a chain-like path in R2 or R3 with a certain number of nodes, typically a fixed step length and has the property that it doesn't cross itself or another walk. A system of SAWs satisfies the so-called excluded volume condition. In higher dimensions, the SAW is believed to behave much like the ordinary random walk. SAWs and SAPs play a central role in the modeling of the topological and knot-theoretic behavior of thread- and loop-like molecules such as proteins. Indeed, SAWs may have first been introduced by the chemist Paul Flory in order to model the real-life behavior of chain-like entities such as solvents and polymers, whose physical volume prohibits multiple occupation of the same spatial point. SAWs are fractals. For example, in d = 2 the fractal dimension is 4/3, for d = 3 it is close to 5/3 while for d ≥ 4 the fractal dimension is 2. The dimension is called the upper critical dimension above which excluded volume is negligible. A SAW that does not satisfy the excluded volume condition was recently studied to model explicit surface geometry resulting from expansion of a SAW. The average size of a self-avoiding walk increases with respect to its length according to an exponent that is the reciprocal of the fractal dimension. The radius of gyration of a SAW depends on the 3/4 power of length in two dimensions, and approximately the 3/5th power in three dimensions. The properties of SAWs cannot be calculated analytically, so numerical simulations are employed. The pivot algorithm is a common method for Markov chain Monte Carlo simulations for the uniform measure on n-step self-avoiding walks. The pivot algorithm works by taking a self-avoiding walk and randomly choosing a point on this walk, and then applying symmetrical transformations (rotations and reflections) on the walk after the nth step to create a new walk. Calculating the number of self-avoiding walks in any given lattice is a common computational problem. There is currently no known formula, although there are rigorous methods of approximation.

Universality One of the phenomena associated with self-avoiding walks and statistical physics models in general is the notion of universality, that is, independence of macroscopic observables from microscopic details, such as the choice of the lattice. One important quantity that appears in conjectures for universal laws is the connective constant, defined as follows. Let cn denote the number of n-step self-avoiding walks. Since every (n + m)-step self avoiding walk can be decomposed into an n-step self-avoiding walk and an m-step self-avoiding walk, it follows that cn+m ≤ cncm. Therefore, the sequence {log cn} is subadditive and we can apply Fekete's lemma to show that the following limit exists:

μ=limn→∞cn1n. μ is called the connective constant, since cn depends on the particular lattice chosen for the walk so does μ. The exact value of μ is only known for the hexagonal lattice, found by Stanislav Smirnov and Hugo Duminil-Copin, where it is equal to:

2+2. For other lattices, μ has only been approximated numerically, and is believed not to even be an algebraic number. It is conjectured that

cn≈μnn1132 as n → ∞, where μ depends on the lattice, but the power law correction n1132 does not; in other words, this law is believed to be universal.

Growing self-avoiding walk

The growing self-avoiding walk (GSAW) is a dynamical process in which a walk starts at the origin of a lattice and takes a step to an unoccupied site in a random direction. When there are no empty adjacent sites, the walk is said to be trapped, similar to the ending scenario in the video game Snake. On a square lattice it is known from computer simulations that the average number of steps reached by a growing self-avoiding walk is approximately 71. The shortest walk that leads to trapping on a square lattice is six steps, and can be achieved by starting on an empty lattice and moving up, right, right, down, down, left, and up. The average number of steps to trapping depends on the lattice or network, it is similar for the honeycomb lattice but near 78 for the triangular lattice. The average trapping length is much higher in three dimensions, being close to 4000 for the simple cubic lattice. The statistics of the traditional self-avoiding walk assume that each walk of a given length is equally likely, which is not the case for GSAWs. For example, there are 100 square lattice SAWs of length 4 starting at the origin, and four that are completely straight, such that there is a 0.04 probability of such a SAW being straight. However, a GSAW must make its first step in any direction with probability 1, its second in the same direction with probability 1/3, as with its third and fourth steps. Thus the probability of a GSAW being straight is 1/81≈0.012. For this reason, GSAWs are empirically observed in simulations to have a smaller scaling exponent (the relationship between the average radius of gyration and length) than the 3/4 predicted by the Flory model, and is observed to be close to 0.68.

Knots in self-avoiding polygons

… excerpt ends here. Continue reading the full article.

Illustrations

Self-avoiding walk: Self-avoiding walk on a 15×15 square lattice
Self-avoiding walk on a 15×15 square lattice
Self-avoiding walk: Self-avoiding walk on a 20x20 square lattice, simulated using sequential Monte Carlo
Self-avoiding walk on a 20x20 square lattice, simulated using sequential Monte Carlo
Self-avoiding walk: Several iterations of a growing self-avoiding walk on a square lattice, which terminate when the walk becomes trapped. The color scale evolves so that the latest step is yellow.
Several iterations of a growing self-avoiding walk on a square lattice, which terminate when the walk becomes trapped. The color scale evolves so that the latest step is yellow.
Self-avoiding walk: A growing self-avoiding walk on a square lattice that has become trapped after taking its first step (green) in the upward direction. After its final step (red) there are no empty adjacent sites to hop to.
A growing self-avoiding walk on a square lattice that has become trapped after taking its first step (green) in the upward direction. After its final step (red) there are no empty adjacent sites to hop to.
Self-avoiding walk: A trefoil knot occupying 24 vertices on a simple cubic lattice, the smallest knotted polygon.
A trefoil knot occupying 24 vertices on a simple cubic lattice, the smallest knotted polygon.

Worked examples

Example 1 — a first encounter with Self-avoiding walk

Start with the simplest possible case. Write down what Self-avoiding walk claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Self-avoiding walk before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Self-avoiding walk ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Self-avoiding walk

In research
Self-avoiding walk appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Self-avoiding walk in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Self-avoiding walk is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational chemistry, Computational physics, Discrete geometry, so understanding it makes those chapters shorter.
In everyday life
Look for Self-avoiding walk outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Self-avoiding walk” →

How to study Self-avoiding walk in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Self-avoiding walk means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Self-avoiding walk out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Self-avoiding walk in simple terms?

In mathematics, a self-avoiding walk (SAW) is a sequence of moves on a lattice (a lattice path) that does not visit the same point more than once. This is a special case of the graph theoretical notion of a path.

Why does Self-avoiding walk matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Self-avoiding walk?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Self-avoiding walk.

Tags

  • Computational chemistry
  • Computational physics
  • Discrete geometry
  • Polygons
  • Variants of random walks

Keep exploring