Tag: Computer language

  • Computer Friendly Sanskrit How NASA Mission Sanskrit

    I had made  passing remarks on how Sanskrit sits at the top of world languages and it is Computer Programing Friendly.

    How?

    Sanskrit for NASA for Mission.jpg
    Sanskrit for NASA for Mission.

     

    ‘Very soon the traditional Indian language Sanskrit will be a part of the space, with the United States of America (USA) mulling to use it as computer language at NASA. After the refusal of the Indian Sanskrit scholars to help them acquire command over the language, US has urged its young generation to learn Sanskrit.( source. http://www.ibtl.in/news/international/1815/nasa-to-echo-sanskrit-in-space-website-confirms-its-mission-sanskrit/)

    # संस्कृत बनेगी नासा की भाषा, पढ़ने से गणित और विज्ञान की शिक्षा में आसानी
    On visit to Agra, Aurobindo Foundation (Indian Culture) Puducherry Director Sampadananda Mishra told Dainik Jagran about the prospects of Sanskrit. Mishra said, “In 1985, NASA scientist Rick Briggs had invited 1,000 Sanskrit scholars from India for working at NASA. But scholars refused to allow the language to be put to foreign use.”

    The NASA website also confirms its Mission Sanskrit and describes it as the best language for computers. The website clearly mentions that NASA has spent a large sum of time and money on the project during the last two decades.”

    How Friendly is Sanskrit to Computer Programming.

    Given below is our sample sentence.  It appears in the text राजनीतिसमुच्चय authored by आचार्य चाणक्य |

    मूर्खः परिहर्तव्यः प्रत्यक्षः द्विपदः पशुः । which means..

    A stupid person must be avoided. He is like a two-legged animal in-front of the eyes.

    Now, let’s get back to our good old Q & A format.

    Q) Are you sure, the English translation you have provided is correct ? Else, why are there only 5 words in the Sanskrit version but so many words in the English version ?
    A) Of course, the translation I provided is absolutely correct. But your doubt is also genuine. To know why the Sanskrit version is so economic in the usage of words, we need to first understand it’s structure.

    Q) Umm hmm, go on..
    A) As mentioned in the first article of the series, the words in Sanskrit represent properties.  So the 5 words used in this sentence also represent properties.
    मूर्ख = (the property of being) stupid
    परिहर्तव्य = (the property that makes one) avoidable (by others)
    प्रत्यक्ष = (the property of being) in front of the eyes
    द्विपद = (the property of) having two legs
    पशु = (the property of usually being) tethered

    But, in spoken language, we always refer to objects and not properties. (The object being referred to need not exist in the real world. It is sufficient if it exists in the speaker’s imagination.)  So we need a way to force the above words to represent objects rather than properties. That way of forcing a word(which represents a property) to represent an object is called vibhakti.

    So, मूर्ख represents the property of being stupid, but मूर्खः (which is a vibhakti of the word मूर्ख) represents an object/person who is stupid. Here, मूर्खः is called the first vibhakti of the word मूर्ख | Similarly, परिहर्तव्यः is the first vibhakti of the word परिहर्तव्य | So, we have
    परिहर्तव्यः = an object/person who must be avoided
    प्रत्यक्षःan object/person located in front of the eyes
    द्विपदः = a object/creature having two legs
    पशुः = an object/creature who is tethered = a beast or cattle (because usually beast or cattle is tethered)

    Q) Hmm, cool. So this sentence has five words which represent 5 properties. But we converted the 5 words into their first vibhaktis. So the 5 new converted words represent 5 objects having those 5 properties. Am I right ?
    A) Yes, absolutely.

    Q) So far we have 5 different (vibhaktified) words representing 5 different objects having 5 different properties. How does this help in making a meaningful sentence. ?
    A) Here comes the climax. There is a rule of Sanskrit Grammar which states that words having the same vibhakti represent the same object and not different objects! So the 5 different (vibhaktified) words actually do not represent 5 different objects, rather they are like pointers that point to the same object because they all have the same vibhakti viz. first vibhakti!”

     

    The same mechanism is explained below graphically.

    Demo of Sanskrit as Computer freindly.jpg
    Demo of Sanskrit as Computer freindly.

    Q) Wow! So a typical word in Sanskrit is like class in Java(without methods) and the vibhaktified form of that word is like a pointer to an object of that class. Right ?
    A) Yes! You got it.  And not just that. There are actually 8 kinds of vibhaktis in all. In this article, we have considered only the first of those 8 kinds of vibhaktis.

     

    Artificial Intelligence.

    ‘There is at least one language, Sanskrit, which for the duration of almost 1,000 years was a living spoken language with a considerable literature of its own. Besides works of literary value, there was a long philosophical and grammatical tradition that has continued to exist with undiminished vigor until the present century. Among the accomplishments of the grammarians can be reckoned a method for paraphrasing Sanskrit in a manner that is identical not only in essence but in form with current work in Artificial Intelligence. This article demonstrates that a natural language can serve as an artificial language also, and that much work in AI has been reinventing a wheel millenia old.

    Computer Programming with Sanskrit.jpg
    Computer Programming with Sanskrit.

    First, a typical Knowledge Representation Scheme (using Semantic Nets) will be laid out, followed by an outline of the method used by the ancient Indian Grammarians to analyze.

    Citation.

    Artificial Intelligence

    Sanskrit for Computer

  • Binomial Triangle Computer Binary System By Pingala Hinduism

    Recently there was a News item that a Scientist has stated that Mythology is to be differntiated from Science and the attempt of the Government to include ‘Pseudo Science’ into Indian Education System.

     

    He was speaking on ‘IIsc debunked Vimanas Theory.

     

    He also observed that ‘the people who say that Hinduism/Vedas have said this before, why do they not say this before the facts are discovered by Science?What they say as facts from the Vedas can not be verified by experiment now”(the  quote is not verbatim, i shall get it shortly).

     

    I shall be posting a rebuttal to this shortly.

     

    Be that as it may, let me reproduce something from the Vedic Period on Binomial System and Binary system, that is used for Modern Computing.

     

    Ancient Indians used Mathematics extensively and relied on it so heavily that Indian Logic, Philosophy,Hindu Rituals and the Sanskrit Language have strong Mathematical base.

     

    Meters, called Chandas are used in Prayers, literary works have a strict Mathematical base.

     

    Pingala, younger brother of Panini, the Sanskrit grammarian, has devised Chanda Shastra that deals with these Meters.

     

    He  is dated to 2 BC, may be earlier.

     

    Another Legend has it that he is the younger brother of Patanjali, who wrote the Yoga Sutra.

     

    This assigns Pinagala to 4 BC.

     

    Each number in the triangle is the sum of the ...
    Each number in the triangle is the sum of the two directly above it. (Photo credit: Wikipedia)

     

     

    The Chandaḥśāstra presents the first known description of a binary numeral system in connection with the systematic enumeration of meters with fixed patterns of short and long syllables.The discussion of the combinatorics of meter corresponds to the binomial theorem. Halāyudha’s commentary includes a presentation of the Pascal’s triangle(called meruprastāra). Pingala’s work also contains the Fibonacci numbers, called mātrāmeru.

     

    Use of zero is sometimes mistakenly ascribed to Pingala due to his discussion of binary numbers, usually represented using 0 and 1 in modern discussion, while Pingala used short and long syllables. As Pingala’s system ranks binary patterns starting at one (four short syllables—binary “0000”—is the first pattern), the nth pattern corresponds to the binary representation of n-1, written backwards. Positional use of zero dates from later centuries and would have been known to Halāyudha but not to Pingala.

     

     

     

    Formation of Binomial Triangle.Pingala Triangle.

     

     

    The Importance given to 2 by Pingala: Pingala in his rules to Sanskrit prosody has given undue importance to the number 2. Typically, he lays down that, Any power of two throughout divisible by two is equal to two raised to the power of two representing the number of twos the first power is divisible by two�, i.e, 216 = 224, 232 = 225, 264 = 226 and so on (VIII.407).

     

     

     

    In grouping heavies and lights, Pingala adopts a unique method.

     

     

     

    If we take Heavy = H and Light = L, for two syllables, we get the combination, as follows:

     

     

     

    1. 1H
    2. 1L

     

     

     

    There are two combinations.

     

     

     

    For 3 syllables, we get,

     

     

     

    1. 3 H
    2. 2H, 1L
    3. 1H, 2L.
    4. 3L.

     

     

     

    There are  four combinations.

     

     

     

    For 4 syllables, we get,

     

     

     

    1. 4H
    2. 3H, 1L
    3. 2H, 2L
    4. 1H, 3L
    5. 4L.

     

     

     

    There are eight combinations.

     

     

     

    For 5 syllables, we get,

     

     

     

    1. 5H
    2. 4H, 1L
    3. 3H, 2L.
    4. 2H, 3L
    5. 1H, 4L
    6. 5L

     

     

     

    There are sixteen combinations.

     

     

     

    Thus, this is the formation of Binomial Numbers, Triangle and Series. They are explained as follows:

     

     

     

    (a + b)o = 1

    (a + b)1 = a + b

    (a + b)2 = a2 + 2ab + b2

    (a + b)3 = a3 + 3a2b + 3ab2 + b3

    (a + b)4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4

    (a + b)5 = a5 + 5a4b + 10a3b2 + 10a2b3 + 5ab4 + b5

    (a + b)= a6 + 6a5b + 15a4b2 + 20a3b3 + 15a2b4 + 6ab5 + b6

    ����

                       1

    1  1

    1   2   1

    1  3    3   1

    1   4   6   4   1

    1 10  5   5  10  5  1

    1   6  15  20   15    6   1

    (a + b)n   = an + [n!/1!(n-1)!] a(n-1) b + [n(n-1)/2!(n-2)!] an(n-1) b2 + [n(n-1)(n-2)/3!(n-3)!] an(n-1)(n-2) b3 + [n(n-1)(n-2)(n-3)/4!(n-4)!] an(n-1)(n-2)(n-3) b4 +��+ bn

     

     

     

    This has been explained in the context of prosody and similar exposition has been made in Vedic literature about the chanting of mantras with time scale. However, the mathematical significance has to be noted here. This Binomial triangle can rightly be called Pingala Triangle and the series Pingala series. Indian mathematicians have identified the series and arranged the numbers in the form of a pyramid, which they called asMeruprasthana and depicted as follows:

     

     

                                                 1

    1     1

    1     2     1

    1    3     3    1

    1   4    6    4     1

    1    5    10   10  5    1

    1   6    15   20   15    6   1

    1   7    21    35    35   21    7    1

    1   8    28   56    70   56   28   8    1

    1   9    36   84   126   126   84   36   9   1

    1  10   45   120  210  252  210  120  45  10   1

    1  11  55  165  330  462  462  330  165  55   11  1

    1   12   66  220  495  792   924  792   495  220  66  12   1

    20

    21

    22

    23

    24

    25

    26

    27

    28

    29

    210

    211

    212

    1

    2

    4

    8

    16

    32

    64

    128

    256

    512

    1024

    2048

    4096

     

     

     

    The basis of writing numbers can be easily explained:

     

     

     

    1. Write one in the first square. 1
    2. Draw two squares below, write 1 , 1 1 1
    3. Draw three squares, write 1, 1 in the first and last squares. 1 2 1

     

    Add the adjacent numbers of the above row and write intermediate numbers i.e, 1+1=2.

     

    4. 1, 1+2=3, 3+1=3, 1 1 3 3 1
     5. 1, 1+3=4, 3+3=6, 3+1+4, 1 1 4 6 4 1

     

     

     

    Like, this, the squares can be continued with added numbers. The following Pingala Triangle is formed for 12 layers and it is mentioned as Meru Prasthana in the literature.

     

     

     

    1

     

    1

     

    1

     

    1

     

    2

     

    1

     

    1

     

    3

     

    3

     

    1

     

    1

     

    4

     

    6

     

    4

     

    1

     

    1

     

    5

     

    10

     

    10

     

    Binary system explained.

     

    0 0 0 0 numerical value = 1
    1 0 0 0 numerical value = 2
    0 1 0 0 numerical value = 3
    1 1 0 0 numerical value = 4
    0 0 1 0 numerical value = 5
    1 0 1 0 numerical value = 6
    0 1 1 0 numerical value = 7
    1 1 1 0 numerical value = 8
    0 0 0 1 numerical value = 9
    1 0 0 1 numerical value = 10
    0 1 0 1 numerical value = 11
    1 1 0 1 numerical value = 12
    0 0 1 1 numerical value = 13
    1 0 1 1 numerical value = 14
    0 1 1 1 numerical value = 15
    1 1 1 1 numerical value = 16

    Other numbers have also been assigned zero and one combinations likewise.

    Pingala’s system of binary numbers starts with number one (and not zero). The numerical value is obtained by adding one to the sum of place values. In this system, the place value increases to the right, as against the modern notation in which it increases towards the left.

    The procedure of Pingala system is as follows:

    Divide the number by 2. If divisible write 1, otherwise write 0.
    If first division yields 1 as remainder, add 1 and divide again by 2. If fully divisible, write 1, otherwise write 0 to the right of first 1.
    If first division yields 0 as remainder that is, it is fully divisible, add 1 to the remaining number and divide by 2. If divisible, write 1, otherwise write 0 to the right of first 0.
    This procedure is continued until 0 as final remainder is obtained.
    Example to understand Pingala System of Binary Numbers :

    Find Binary equivalent of 122 in Pingala System :

    Divide 122 by 2. Divisible, so write 1 and remainder is 61. 1
    Divide 61 by 2. Not Divisible and remainder is 30. So write 0 right to 1. 10
    Add 1 to 61 and divide by 2 = 31.
    Divide 31 by 2. Not Divisible and remainder is 16. So write 0 to the right. 100
    Divide 16 by 2. Divisible and remainder is 8. So write 1 to right. 1001
    Divide 8 by 2. Divisible and remainder is 4. So write 1 to right. 10011
    Divide 4 by 2. Divisible and remainder is 2. So write 1 to right. 100111
    Divide 2 by 2. Divisible. So place 1 to right. 1001111
    Now we have 122 equivalent to 1001111.

    Verify this by place value system : 1×1 + 0×2 + 0×4 + 1×8 + 1×16 + 1×32 + 1×64 = 64+32+16+8+1 = 121
    By adding 1(which we added while dividing 61) to 121 = 122, which is our desired number.
    In Pingala system, 122 can be written as 1001111.

    Though this system is not exact equivalent of today’s binary system used, it is very much similar with its place value system having 20, 20, 21, 22, 22, 23, 24, 25, 26 etc used to multiple binary numbers sequence and obtain equivalent decimal number.

    Reference : Chandaḥśāstra (8.24-25) describes above method of obtaining binary equivalent of any decimal number in detail.
    These were used 1600 years before westerners/arabs copied binary system from India through trade and invasion.

    We now use zero and one (0 and 1) in representing binary numbers, but it is not known if the concept of zero was known to Pingala— as a number without value and as a positional location.Pingala’s work also contains the Fibonacci number, called mātrāmeru, and now known as the Gopala–Hemachandra number. Pingala also knew the special case of the binomial theorem for the index 2, i.e. for (a + b) 2, as did his Greek contemporary Euclid..

     

    This article is based on the research work of Dr.K.V.Ramakrishna Rao and material from the site’s Link provided second at the end of the Post.

     

    http://www.allempires.com/forum/forum_posts.asp?TID=17915

     

    http://dwarak82.blogspot.in/2015/01/father-of-binary-system-pingala-genius.html

    https://ramanisblog.in/tag/computer-language/

     

  • Sanskrit Best For Artificial Intelligence Study

     

    Two languages,Sanskrit and Tamil are the oldest languages of Humanity.

     

    Essentials in Artificial  Intelligence.Image.jpg.
    Essentials in Artificial Intelligence.

     

    While Tamil is in very much vogue, spoken Sanskrit is practically dead, save in a few villages in Maharashtra near Pune and in  Kerala.

     

    Both the languages though unique in their own way, they have influenced each other.

     

    One of the reasons for these languages being called Rich is the fact that they are as logical as Mathematics and Logical Positivism.

     

    Language to be rich should have the capacity to transmit thoughts unambiguously, logically the Human feelings and emotions.

     

    This can be achieved in two primary ways.

     

    One is that one word indicating a thing or feeling shoudl have as many words as possible to differentiate and convey the exact feeling or thought.

     

    Tamil achieves this by possessing as many word as possible to indicate the same thing or feeling.

     

    For instance, the word which one uses for” more in Tamil is ‘Athikam/Jaasthi.

     

    These words unfortunately are not Tamil.

     

    There are Seven  words to convey the meaning with a slight difference.

     

    They are,

     

    சால, உறு, தவ ,நனி ,கூர் ,கழி, மிகல்.

     

    There is a fine distinction between these words .

     

    This way Tamil makes sue one expresses feelings exactly.

     

    The second is that emotions and thoughts can be expressed through the tone.

     

    This Sanskrit achieves by differentiating sounds.

     

    Letters have different sounds to differentiate sounds.

     

    The sound ‘ka’ as four different tones and this is accommodated in Sanskrit by ascribing four different letters.

     

    Depending on he tone, the meanings change.

     

    And to make things more clear in a Language, clarity has to be achieved by giving prominence to the Verb.

     

    Both Tamil and Sanskrit use this to the maximum advantage.

     

    Computer programming needs such clarity of thought and logical sequencing.

     

    This becomes more critical in  Artificial Intelligence.

     

    Sanskrit has been found to be the most suited for developing Artificial Intelligence.

     

    NASA Research papers confirm this.

     

    A Report.

     

    There is at least one language, Sanskrit, which for the duration of almost 1,000 years was a living spoken language with a considerable literature of its own. Besides works of literary value, there was a long philosophical and grammatical tradition that has continued to exist with undiminished vigor until the present century. Among the accomplishments of the grammarians can be reckoned a method for paraphrasing Sanskrit in a manner that is identical not only in essence but in form with current work in Artificial Intelligence. This article demonstrates that a natural language can serve as an artificial language also, and that much work in AI has been reinventing a wheel millenia old.

     

    Semantic Nets
    For the sake of comparison, a brief overview of semantic nets will be given, and examples will be included that will be compared to the Indian approach. After early attempts at machine translation (which were based to a large extent on simple dictionary look-up) failed in their effort to teach a computer to understand natural language, work in AI turned to Knowledge Representation.

    Since translation is not simply a map from lexical item to lexical item, and since ambiguity is inherent in a large number of utterances, some means is required to encode what the actual meaning of a sentence is. Clearly, there must be a representation of meaning independent of words used. Another problem is the interference of syntax. In some sentences (for example active/passive) syntax is, for all intents and purposes, independent of meaning. Here one would like to eliminate considerations of syntax. In other sentences the syntax contributes to the meaning and here one wishes to extract it.

     

    ..

    It is obvious that the act of receiving can be interpreted as an action involving a union with Mary’s hand, an enveloping of the ball by Mary’s hand, etc., so that in theory it might be difficult to decide where to stop this process of splitting meanings, or what the semantic primitives are. That the Indians were aware of the problem is evident from the following passage: “The name ‘action’ cannot be applied to the solitary point reached by extreme subdivision.”

    The set of actions described in (a) and (b) can be viewed as actions that contribute to the meaning of the total sentence, vix. the fact that the ball is transferred from John to Mary. In this sense they are “auxiliary actions” (Sanskrit kuruku-literally “that which brings about”) that may be isolated as complete actions in their own right for possible further subdivision, but in this particular context are subordinate to the total action of “giving.” These “auxiliary activities” when they become thus subordinated to the main sentence meaning, are represented by case endings affixed to nominals corresponding to the agents of the original auxiliary activity. The Sanskrit language has seven case endings (excluding the vocative), and six of these are definable representations of specific “auxiliary activities.” The seventh, the genitive, represents a set of auxiliary activities that are not defined by the other six. The auxiliary actions are listed as a group of six: Agent, Object, Instrument, Recipient, Point of Departure, Locality. They are the semantic correspondents of the syntactic case endings: nominative, accusative, instrumental, dative, ablative and locative, but these are not in exact equivalence since the same syntactic structure can represent different semantic messages, as will be discussed below. There is a good deal of overlap between the karakas and the case endings, and a few of them, such as Point of Departure, also are used for syntactic information, in this case “because of”. In many instances the relation is best characterized as that of the allo-eme variety..

     

    Citation of the excerpts from.

     

    http://www.vedicsciences.net/articles/sanskrit-nasa.html

     

     

    Enhanced by Zemanta