Programming Loops and Hindu Trinity

While reading Thomas Cormen’s Algorithms Unlocked, I chanced upon the theory on loop invariants. For a loop invariant to help us argue correctness, we need to show three things about it:

  1. Initialization
  2. Maintenance
  3. Termination

In the Hindu system of Gods, we have the trinity of:

  1. Brahma – the Creator
  2. Vishnu – the Maintainer
  3. Shiva – the Destroyer

In programming, we have loops – they can be initialized, maintained and terminated.

Similarly in life, we have birth, life and then death.

It’s so analogous to see both in action here. Probably computer science can one day develop more due to the hidden knowledge of Hinduism. Or probably it’s just common sense.

Whatsoever it may be, it felt good to draw this analogy today.

One Comment Add yours

  1. The person whom you hate the most says:

    Nature always runs towards attaining stability so as the hinduism.So, It is not only about computer science but all sciencess can be related to hinduism. Sadly, young generation is trying to reach infinity for peace not knowing that It is at zero. (When ambitious ends, peace starts by Rajanikanth sir and I know young generation does not agree on this )Technology is in the hands of these running people.May be thats the reason I could not find the analogies between hinduism and technology.
    And also may be because Technology is associated with business terms.And business is said to successful when it earns profit and profit here is only money.Technologies are after earning money where as hinduism is not.Both have different agendas.
    This is the reason I only concentrated on science for few years and humiliated by technology people that I did nothing and knew nothing.
    Anyways I am also running towards technology right now for money. But will definitely stop working on technology when I have enough money and live with science by working on renewable energies.

    Liked by 2 people

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s