Ravana's Ten Heads
Neuroscience & Parallel Computing

Ravana's Ten Heads

The demon king who could think ten thoughts at once — and the science of parallel processing.

Neuroscience & Parallel Computing12-Month Curriculum 12h

The Story

The King of Lanka

In the age before ages, when the gods still walked the earth and the boundary between heaven and the mortal world was thin as silk, there lived a king named Ravana.

He was not born a king. He was born a Brahmin — a scholar's son, grandson of Pulastya, one of the mind-born sons of Brahma the Creator. From his first breath, Ravana was brilliant. He learned to read before he could run. He memorised the four Vedas — thousands of verses — while other children were still learning to count. By the time he was a young man, he had mastered music so completely that he could make the strings of his veena weep or laugh at will.

But brilliance was not enough. Ravana wanted more. He wanted power over death itself.

The Penance

He went to the wilderness and performed tapasya — an act of focused meditation so intense it could bend the fabric of reality. For thousands of years, Ravana sat motionless under a burning sun, eating nothing, drinking nothing, his mind fixed on a single point. When even that was not enough, he cut off his own head as an offering to Brahma.

The head grew back. He cut it off again. And again. Ten times he severed his own head and offered it to the fire. Each time, a new head grew in its place — not a copy, but something different. Each head carried its own knowledge, its own perspective, its own voice.

Brahma, moved by the severity of this penance, appeared before Ravana and granted him a boon: near-immortality. No god, no demon, no celestial being could kill him. Ravana had become virtually indestructible.

Ten Heads, Ten Minds

Ravana's ten heads were not just decoration. The ancient texts describe each head as a centre of distinct knowledge. One head held mastery of the Vedas and scripture. Another held warfare and strategy. A third contained knowledge of music and the arts. Others governed astronomy, medicine, law, engineering, sorcery, politics, and philosophy.

Imagine it: ten streams of thought running simultaneously. While one head composed a verse of poetry, another was calculating the movement of the stars, a third was planning a military campaign, and a fourth was debating a point of law.

In modern terms, Ravana was a parallel processor — ten independent minds working at the same time on different problems. A normal person thinks one thought at a time, switching between tasks like a single musician playing one instrument. Ravana was an entire orchestra, each musician playing a different part, producing a symphony of thought.

This made him terrifying. In battle, one head could read an opponent's stance while another recalled the counter-move from ancient texts, while a third calculated the angle of attack, while a fourth issued commands to his army. His enemies faced not one strategist but ten, all sharing a single body.

The Flaw in Parallel

But here is what the story teaches, and what computer scientists would later rediscover: parallel processing has a bottleneck.

Ravana's ten heads could think independently, but they shared one heart. That heart was consumed by a single emotion — pride. When Ravana kidnapped Sita, it was not a decision made by ten heads reasoning carefully. It was an impulse driven by one uncontrolled desire that overrode all ten minds at once.

His heads could process in parallel, but his heart was a single point of failure. The greatest scholar of his age, the most powerful being in the three worlds, was undone not by a lack of intelligence but by the one thing that could not be parallelised: wisdom.

When Rama's arrow found its mark, it struck not a head but the heart — the single thread that connected all ten processors. Cut the shared resource, and the entire system collapses.

What Ravana Teaches Us About Brains and Computers

Your brain has eighty-six billion neurons, vastly more than Ravana's ten heads. Yet you cannot truly think two thoughts at once. You switch between tasks rapidly — so rapidly it feels simultaneous — but your conscious attention is a single thread. Your brain is massively parallel at the unconscious level (processing vision, heartbeat, balance, digestion all at once) but stubbornly serial at the level of deliberate thought.

Computers face the same challenge. A CPU processes instructions one at a time, incredibly fast but fundamentally serial. A GPU has thousands of tiny processors that work in parallel — brilliant for repetitive tasks like rendering every pixel on a screen, but useless for tasks that require step-by-step reasoning.

The most powerful systems combine both: serial reasoning for complex decisions, parallel processing for brute-force computation. Sound familiar? Ravana had ten heads for parallel expertise and one heart for unified purpose. The flaw was not in the architecture. The flaw was in the programming.

The end.

Try It Yourself

Choose your level. Everyone starts with the story — the code gets deeper as you go.

Story Progress

0%

Ready to Start Coding?

Here is a taste of what Level 1 looks like for this lesson:

Level 1: Explorer — Python
import time, threading

def think(head_name, duration):
    """One of Ravana's heads working on a task."""
    print(f"  {head_name}: starting...")
    time.sleep(duration)
    print(f"  {head_name}: done! ({duration}s)")

tasks = [("Vedas", 1), ("Music", 1), ("Strategy", 1), ("Astronomy", 1)]

# Serial: one head at a time
start = time.time()
print("=== Serial (one head) ===")
for name, dur in tasks:
    think(name, dur)
serial_time = time.time() - start

# Parallel: all heads at once
start = time.time()
print("\n=== Parallel (Ravana's 10 heads) ===")
threads = [threading.Thread(target=think, args=(n, d)) for n, d in tasks]
for t in threads: t.start()
for t in threads: t.join()
parallel_time = time.time() - start

print(f"\nSerial: {serial_time:.1f}s | Parallel: {parallel_time:.1f}s")
print(f"Speedup: {serial_time/parallel_time:.1f}x")

This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build a Multi-Threaded Task Scheduler.

By Level 4, enrolled students build: Build a Multi-Threaded Task Scheduler

Free

Level 0: Listener

Stories, science concepts, diagrams, quizzes. No coding.

You are here

Enrolled

Levels 1-4

Python, NumPy, Matplotlib, real projects, mentorship.

Sign Up Free

Stay Updated

Join Waitlist

Get notified when enrollment opens for your area.

Notify Me

Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.