Random mutations

def dfs(s, adj):
xs = [s]
visited = set()
while xs:
u = xs.pop()
if u not in visited:
print(u)
visited.add(u)
for v in adj.get(u, []):
xs.append(v)
def bfs(s, adj):
xs = [s]
visited = set()
while xs:
u = xs.pop(0)
if u not in visited:
print(u)
visited.add(u)
for v in adj.get(u, []):
xs.append(v)

Tiny, single letter random mutations are enough for evolution to explore vast landscapes. A demonstration using code, but the same principle applies to single letter changes in DNA.

The code on the left (dfs) does a depth first search, the code on the right (bfs) does a breath first search. These are two entirely different algorithms, with entirely different outcomes. Yet the difference in the code between the two is just a single letter (The extra 0 in the bfs version).

It is totally conceivable to imagine a mindless evolutionary process that makes this single letter "mistake" when copying over the code (or DNA), and ends up with an entirely different organism than its peers. Thereafter, it is just lather, rinse and repeat.

Manav Rathi
Aug 2019