Hypothesis: Every sentence that has to be parsed is analogous to every life that has to be lived.
Variables: Karma as in Action, input string as life, grammar as laws of nature and the Parsing algorithm as in Samsara (the cycle).
Karma:
- Kriyamana Karma(current action) is the karma that human beings are creating in the present, the fruits of which will be experienced in the future.
- Sanchitha Karma(accumulated actions) is the sum of one's past karmas – all actions (good and bad) from one's past life follow through to the next life.
- Prarabdha Karma(fruitful actions) is that portion of the sanchita karma which influences human life in the present incarnation is called prarabdha.
Samsara Algorithm:-
While (A Jiva cannot attain moksha until the accumulated sanchita karmas are completely exhausted)
{
From this stock of sanchita karma, a handful is taken out to serve one lifetime and this handful of actions.
prarabdha karmas begun to bear fruit and which will be exhausted only on their fruit being enjoyed and not otherwise.
as prarabdha karma for being enjoyed in one lifetime, leading to the cycle of birth and death.
All kriyamana karmas become sanchita karma upon completion.
}
As an example of a Parsing Algorithm, I found Earley Parsing Algorithm as the closest analogy to the Samsara algorithm. I could only find this algorithm given the limitations of my perspective and intellect. One may find a better analogy on any given day.
Earley Parsing Algorithm:-
Earley's algorithm is a top-down dynamic programming algorithm. In the following, we use Earley's dot notation: given a production X → αβ, the notation X → α • β represents a condition in which α has already been parsed and β is expected.
For every input position (which represents a position between tokens), the parser generates an ordered state set. Each state is a tuple (X → α • β, i), consisting of
- the production currently being matched (X → α β)
- our current position in that production (represented by the dot)
- the position i in the input at which the matching of this production began: the origin position
The state set at input position k is called S(k). The parser is seeded with S(0) consisting of only the top-level rule. The parser then iteratively operates in three stages: prediction, scanning, and completion.
Prediction: For every state in S(k) of the form (X → α • Y β, j) (where j is the origin position as above), add (Y → • γ, k) to S(k) for every production with Y on the left-hand side. Kriyamana Karma (current action)
Scanning: If a is the next symbol in the input stream, for every state in S(k) of the form (X → α • a β, j), add (X → α a • β, j) to S(k+1). Prarabdha Karma (fruitful action)
Completion: For every state in S(k) of the form (X → γ •, j), find states in S(j) of the form (Y → α • X β, i) and add (Y → α X • β, i) to S(k). Sanchitha Karma (accumulated actions)
5 comments:
nice work sir :) I can just say that if u wud have written this blog earlier I cud have solved that problem based on "Earley-parser" given in NLP exam in a better way :P
Very Interesting
nice post aasish(hope you dont mine me going public with our little pact.) .. Athough topics like karma, heaven or destiny dont really interest me, ur mention of parsing demanded a reading.. :P
so the way I see it.. the Earley parser looks at all possible outcomes at evry single state but does not decide on which one until it parses the sentence.. so its has multiple "threads" at any given time.. but thts not the case with life... unless u believe in Parallel universes too :)(now thts another candidate for analogies ) .. Life is lived more like a greedy algorithm.. where choices can be varied but instantaneous. .. you dont wait till you die.. to decide whether you would be a doctor or an engineer .. :)..
and then again.. no analogy is perfect..
P.S. this sounded more like a research paper thana a blog post.. a little joke here and there would do no harm.. ;-) now I know my blog sux more.. but i do read many others..
@Raghav, Pawandeep, Pravar.
Thanks for your comments. :)
@Pravar
I never intended to post this blog like a research paper. My intent was only to give an interesting analogy, at least in my view. :)
My take on Life:-
Life is not greedy, it is stochastic.
Why not Greedy ?
Because, you don't get to make a choice based on a single parameter at every point of decision and you can carry forward more than one choice at any given time. So, it doesn't represent a greedy algorithm that can only have one best outgoing path at a given node.
Yes, Life is not a decision tree, as it may seems to be. :)
Why stochastic?
You believe that you may end up with less or no opportunities in future, so you may want to keep few options open at every point of time. Yes, you arrange them in order of preference which makes life stochastic.
So, you may want to compare it with a probabilistic parse tree.
Current, past and then later, these concepts wud apply to most things in life. As in, one has a problem at hand, one considers past behaviour and then completes the set.
Its interesting how you brought this out in Karma and parsing, my point is, this applies at a variety of places with no one place claiming its invention.
About your comment, which classifies life as being stochastic, once again, is too broad a generalisation for something as complex as life. As an example, life does get simple greedy at times and then at most times its Monte Carlo.
Post a Comment