Posted on Leave a comment

The Three Laws of Recursion

Recursion | Russian dolls

Like the robots of Asimov, all recursive algorithms must obey three important laws:

  • A recursive algorithm must have a base case.
  • A recursive algorithm must change its state and move toward the base case.
  • A recursive algorithm must call itself, recursively.

Recursion is the process of defining a problem (or the solution to a problem) in terms of (a simpler version of) itself. For example, we can define the operation “find your way home” as: If you are at home, stop moving. Take one step toward home.

Let’s begin our discussion of recursion by examining the first appearance of fractals in modern mathematics. In 1883, German mathematician George Cantor developed simple rules to generate an infinite set:

Cantor’s rule for an infinite set

There is a feedback loop at work here. Take a single line and break it into two. Then return to those two lines and apply the same rule, breaking each line into two, and now we’re left with four. Then return to those four lines and apply the rule. Now you’ve got eight. This process is known as recursion: the repeated application of a rule to successive results. Cantor was interested in what happens when you apply these rules an infinite number of times.

George Cantor

Dichotomy paradox – Zeno’s

“That which is in locomotion must arrive at the half-way stage before it arrives at the goal.”

— as recounted by Aristotle, Physics VI:9, 239b10

Suppose Atalanta wishes to walk to the end of a path. Before she can get there, she must get halfway there. Before she can get halfway there, she must get a quarter of the way there. Before traveling a quarter, she must travel one-eighth; before an eighth, one-sixteenth; and so on.

Zeno’s paradox was recursive by cutting the distance in half each time to the infinitesimal. This is also how the Tortoise beat the Hair by questioning time over distance.

Recursive Function Calls

The tortoise and the Hair – the paradox of time
int factorial(int n) 
{ if (n == 1) { return 1; }
else { return n * factorial(n-1); } }

A function that does call others is called a nonleaf function. … The factorial function can be rewritten recursively as factorial(n) = n × factorial(n – 1). The factorial of 1 is simply 1. The image shows an object trace of the factorial function written as a recursive function. Each call goes in the run time stack until the base case is reached, and the the stack is popped as the result is passed to each function on the stack.

Five Factorial (5!) in recursion

What Is a Fractal?

The term fractal (from the Latin fractus, meaning “broken”) was coined by the mathematician Benoit Mandelbrot in 1975. In his seminal work “The Fractal Geometry of Nature,” he defines a fractal as “a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole.”

Recursion in Nature

Looking closely at a given section of the tree, we find that the shape of this branch resembles the tree itself. This is known as self-similarity; as Mandelbrot stated, each part is a “reduced-size copy of the whole.”

The Three Laws of Robotics

Isaac Asimov was an American writer and professor of biochemistry at Boston University. During his lifetime, Asimov was considered one of the “Big Three” science fiction writers, along with Robert A. Heinlein and Arthur C. Clarke. A prolific writer, he wrote or edited more than 500 books.

  • A robot may not injure a human being or, through inaction, allow a human being to come to harm
  • A robot must obey the orders given it by human beings except where such orders would conflict with the First Law
  • A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws
Partial sources: https://natureofcode.com/book/chapter-8-fractals/, Wikipedia, Google 
Posted on

Alan Alda | The 3 Rules of 3

Alan Alda | The 3 Rules of Three

We Were Built to Connect with Other People — Here’s How to Be Better At It. Before you follow another “tip” or “trick,” there’s something Alan Alda wants you to know.

His best tip to become a better communicator is what he calls the three rules of three. Listen to his practical hints for becoming a communication pro but, as he remarks, try to get there organically through the process. Alan Alda’s most recent book is If I Understood You, Would I Have This Look on My Face?

“So the first rule is, I try only to say three important things when I talk to people”.

“The second rule is, if I have a difficult thing to understand, if there’s something I think is not going to be that easy to get, I try to say it in three different ways”.

“And the third tip, which I always forget, is that if I have a difficult thing that’s hard to get, I try to say it three times through the talk”.

—- Alan Alda
Alan Alda
Alan Alda

Alan Alda doesn’t want you to take “pro tips” from anyone-not even Alan Alda. When it comes to his area of expertise public speaking and empathetic communication there are no hacks or shortcuts; if you want to be a world class public speaker, you have to earn those stripes through the process of deeply understanding what it is to talk, listen, and connect.

Alda calls tips intellectual abstractions; it’s akin to the difference between information and knowledge, between parroting a few words in French and speaking the actual language. But, when pushed by yours truly at Big Think, Alda does give up the goods (willingly we promise no Alan Aldas were harmed in the making of this video).

5 min Video

Alan Alda | The 3 Rules of 3

Alan Alda has earned international recognition as an actor, writer and director. In addition to The Aviator, for which he was nominated for an Academy Award, Alda’s films include Crimes and Misdemeanours, Everyone Says I Love You, Flirting With Disaster, Manhattan Murder Mystery, And The Band Played On, Same Time, Next Year and California Suite, as well as The Seduction of Joe Tynan, which he wrote, and The Four Seasons, Sweet Liberty, A New Life and Betsy’s Wedding, all of which he wrote and directed. Recently, his film appearances have included Tower Heist, Wanderlust, and Steven Spielberg’s Bridge of Spies.

Source: https://bigthink.com/neuropsych/alan-alda-we-were-built-to-connect-with-other-people-heres-how-to-be-better-at-it/

Posted on

Noise by Daniel Kahneman | 3 Distinctions

Noise | Michael Shermer (left) and Daniel Kahneman (right)

The Michael Shermer Show with Daniel Kahneman – Noise: A Flaw in Human Judgment

DESCRIPTION

Imagine that two doctors in the same city give
different diagnoses to identical patients. Now
imagine that the same doctor making a different
decision depending on whether it is morning or
afternoon, or Monday rather than Wednesday.
This is an example of noise: variability in
judgments that should be identical.

Shermer speaks with Nobel Prize winning
psychologist and economist Daniel Kahneman
about the detrimental effects of noise and what
we can do to reduce both noise and bias, and
make better decisions in: medicine, law, economic
forecasting, forensic science, bail, child
protection, strategy, performance reviews, and
personnel selection.

Video clip – 3 minutes

Noise by Daniel Kahneman | 3 Distinctions

SUPPORT THE PODCAST
If you enjoy the podcast, please show your
support by making a donation. Your patronage will
ensure that sound scientific viewpoints are heard
around the world.
https://www.skeptic.com/donate/
SPONSOR
Wondrium
https://wondrium.com/shermer
SPONSOR
Brilliant
https://brilliant.org/MichaelShermer/

Listen to The Michael Shermer Show via Apple
Podcasts, Spotify, Amazon Music, Google
Podcasts, Stitcher, iHeartRadio, and Tuneln.
https://www.skeptic.com/michael-sherm..

Full Video – Noise by Daniel Kahneman

Full video at https://youtu.be/5CFjERpwFys