Ashtadhyayi - The First Book on Computation

45
Dec 23rd 2009, HCU, Hyderabad अअअअअअअअअअअ The First Book of Computation By Sridhar S. Varakhedi Srinivasa

Transcript of Ashtadhyayi - The First Book on Computation

Dec 23rd 2009, HCU, Hyderabad

अअअअअअअअअअअ The First Book of Computation

BySridhar S.

Varakhedi Srinivasa

Dec 23rd 2009, HCU, Hyderabad

Topicsअअअअअअअअअअअ - a Programming Language

अअअअअअअअअअअ - a Computer Program Software Architecture of अअअअअअअअअअअ

Conflict Resolution in अअअअअअअअअअअIllustrationsMathematical formulae

Summary

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Dec 23rd 2009, HCU, Hyderabad

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Computational Structure of Aṣtādhyāyī

Siddha block contains sutras belonging to sapādasaptādhyāyī (SA) excluding asiddhavat sutras

Asiddhavat block contains sutras from 6.4.22 to 6.4.175.

Asiddha block contains tripādī(TP) sutras.(8.2.1 till the end)

Legend

A, B–EnvironmentC –Final state/result

Sutra group

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

A

A

C

Input

Legend

A, B–EnvironmentC –Final state/result

Legend

A, B–EnvironmentC –Final state/result

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

AB

C

Input

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Computational Structure of Aṣtādhyāyī

Each small circle represents a group of sutras that are grouped in the form of tree based on topics.

A, B represent different states of input (environment).

Inward arrows towards circles indicate environment is observed by sutras. Outward arrows indicate modification of the environment on application of sutras.

C represents the final state.

Legend

A, B–EnvironmentC –Final state/result

Sutra group

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

A

A

C

Input

Legend

A, B–EnvironmentC –Final state/result

Legend

A, B–EnvironmentC –Final state/result

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

AB

C

Input

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Illustration – Siddha Block

Let A = [vana ṭā] is present state.

The sutra ‘ṭā ṅasiṅasāminātsyāḥ’ , in the siddha block finds the condition for its application.

This sutra is applied and A gets changed to [vana ina].

Sutra ‘ādgunaḥ’, in the siddha block finds the condition and is applied.

A now reads as [vanena] Further, no sutra in any

block finds condition. Hence, A is passed to C.

Now C has the final form [vanena]

Legend

A, B–EnvironmentC –Final state/result

Sutra group

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

A

A

C

Input

Legend

A, B–EnvironmentC –Final state/result

Legend

A, B–EnvironmentC –Final state/result

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

AB

C

Input

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Illustration – Asiddha Block

Let A = [dvau atra]. The sutra ‘ecoyavāyāvaḥ’ in the

siddha block finds its condition and gets applied. A is changed to [dvāv atra].

No sutra in the siddha block or the asiddhavat block finds condition in A.

The sutra ‘lopaḥ śākalyasya’ in the asiddha block finds the condition and gets applied. A is changed to [dvā atra].

Since this state is invisible to the sutras either in the siddha block or in the asiddhavat block, even though there is condition for the ‘akaḥsavarṇe dīrghaḥ’ in the siddha block, this sutra does not find condition for application.

The sutras subsequent to ‘lopaḥ śākalyasya’ do not find any application due to non availability of their condition, though the current state is visible.

C has the final form [dvā atra].

Legend

A, B–EnvironmentC –Final state/result

Sutra group

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

A

A

C

Input

Legend

A, B–EnvironmentC –Final state/result

Legend

A, B–EnvironmentC –Final state/result

AsiddhavatBlock

SiddhaBlock

AsiddhaBlock

AB

C

Input

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Representation of Sutras

• Sutras are objects in Object oriented programming terms.

• The sutras are grouped in the form of a tree for each of the topics (ekavākyaṃ).

• The most general sutra is placed on the top of tree (root node) and exception (apavāda) sutras will be child nodes.

Third International Symposium on Sanskrit Computational Linguistics, HCU, Hyderabad. 15-17 Jan 2009

Example

1. iko yaṇaci 6.1.772. ecoyavāyāvaḥ 6.1.783. vānto yi pratyaye 6.1.794. dhātostannimittasaiva 6.1.805. ādguṇaḥ 6.1.876. vṛddhireci 6.1.88

7. etyedhatyūṭhsuetyedhatyūṭhsu 6.1.898. eṅi pararūpaṃ 6.1.949. omāṅgośca 6.1.9510. ato guṇe 6.1.9711. akaḥ savarṇe dīrghaḥ 6.1.10112. prathamayoḥ pūrvasavarṇaḥ 6.1.102.

1

3

4

5

12

10

8

9 7

11611

12

10

2

Dec 23rd 2009, HCU, Hyderabad

अअअअअअअअअअअ – a Programming Language

Programming Language

अअअअअअअअअअअ Java

Artificial Language

सस, ससस, ससस, सस for, while, main

Variables सससससस, सस, सससस

NUM_GEARS, count, content_name

Operators ससससस, ससस, ससस +, ++, %

Statement ससस सससस count = count + 1;Control Flow

ससससससस-ससससस, ससससससससस

IF-THEN-ELSE, WHILE, CASE

Block सससससस Begin-EndRule Ordering ससससससससस Sequence of

Statements

Dec 23rd 2009, HCU, Hyderabad

अअअअअअअअअअअ – a Program Program अअअअअअअअअअअ JavaCode ससस सससस While ( count <

100)Constants & Variables

सससससससससससससससससससससससससससस सससस

Int NUM_GEARS=5;Int count; Decimal amt;

Operators सससससससससससस count++;

Statements ससस सससस count = count + 1;Logic using Control Flow

ससस सससससससससससससस

If (a > b) then If (a != c) a++; endif

Blocksसससस-सससससस, ससससससस सससससस

Begin-End

Functions सससससससससससससससससस get(), set()

Dec 23rd 2009, HCU, Hyderabad

SA AV

TU

ENV

TP

Conf l ict Resolver

SH

TF

AF

EF

EF

F1.. Fn

O

I

Filters for the tripādī sutras that filters the sutras that are following the particular

sutra not the previous sutras.

Software Architecture of अअअअअअअअअअअ

Ekādeśa Filter

(6.1.87 - 6.1.111)

Input

Output

Sapādasaptādhyāyī (1.1.1 – 8.1.74)

Asiddhavat Filter (6.4.22 - 6.4.175)

Tuk sutras (6.1.71-6.1.76)Tripādī

sutras (8.2.1 – 8.4.68)

Environment (Prakriya Stack)

Ṣatva sutras(8.3.55 – 8.3.119)

Tripādī Filter (8.2.1 – 8.4.68)

Asiddhavat sutras

(6.4.22 - 6.4.175)

Conflict Resolver (CR) determines the sutra to be applied when more than one

sutra is applicable.

Ekādeśa Filter (6.1.87 - 6.1.111)

Dec 23rd 2009, HCU, Hyderabad

SA AV

TU

ENV

TP

Conf l ict Resolver

SH

TF

AF

EF

EF

F1.. Fn

O

I

Illustration – SA Block

vana ṭā

‘ṭā ṅasiṅasāminātsyāḥ’ (6.1.12)

vana ina

vana ṭā

‘ādgunaḥ (6.1.78)

vanenavana inavana ṭā

vanena

Dec 23rd 2009, HCU, Hyderabad

SA AV

TU

ENV

TP

Conf l ict Resolver

SH

TF

AF

EF

EF

F1.. Fn

O

I

Illustration – AV Block

śās hi

śā hau’(6.4.35

)‘hujhalbhyo

herdhiḥ’(6.4.101)

śā hi

‘śās hi

śās hi

śā dhiśā hi

‘śās hi

śādhi

Dec 23rd 2009, HCU, Hyderabad

SA AV

TU

ENV

TP

Conf l ict Resolver

SH

TF

AF

EF

EF

F1.. Fn

O

I

Illustration – TP Block

dvau atra

ecoyavāyāvaḥ’(6.1.78)

dvāv atradvau atra

lopaḥ śākalyasya’(8.3.19)

dvā atradvāv atradvau atra

akaḥsavarṇe dīrghaḥ’(6.1.101)

dvav atradvau atra

dvā atra

Dec 23rd 2009, HCU, Hyderabad

Conflict Resolution Techniques

What is Conflict ? When two or more sutras find their condition in a

particular context then all these sutras are said to be in conflict (vipratiṣedha), as only one sutra need to be applied at a time.

Ways of Conflict Resolution are found in Aṣtādhyāyī Vartikas

Aṣtādhyāyī Vipratiṣedhe paraṃ kāryaṃ Siddha-Asiddha Principle etc

Vartikas. Para-nitya-antaraṅga-apavādānāṃ uttarottaraṃ balīyaḥ Varṇādāṅgaṃ balīyo bhavati Lakṣye lakṣaṇaṃ sakṛdeva pravartate etc

Dec 23rd 2009, HCU, Hyderabad

Siddha-Asiddha PrincipleSutras are Siddha (visible) unless explicitly mentioned as Asiddha (invisible)

Asiddhatva is explicitly mentioned in the sutras-

Ṣatvatukorasiddhaḥ 6.1.86

Asiddhavadatrābhāt 6.4.22

Pūrvatrāsiddhaṃ 8.2.1

Siddha Rule precede over Asiddha rule.

1. Śivachāyā 2. Śivatchāyā 6.1.73 (che

ca) 3. Śivadchāyā 8.2.39 4. Śivajchāyā 8.4.40 5. Śivacchāyā 8.4.55

Here ‘jhalāṃ jaśonte’ 8.2.39 and ‘stoḥ ścunā ścuḥ’ 8.4.40 both have the condition, since 8.4.40 is asiddha for 8.2.39, siddha rule is given priority in application. Similarly the case is repeated in 8.4.40 and ‘khari ca’ 8.4.55.

Dec 23rd 2009, HCU, Hyderabad

Mathematical Definition of Nitya and Anitya

Let A(X,) returns result of application of sutra X in the state and returns zero if sutra X is not applicable.

If (A(X, A(Y, )) != 0, then X is Nitya

else X is Anitya.

= [tud tip] X = ‘Tudādibhyaḥ śaḥ

3.1.77’, Y = ‘Pugantalaghūpadasya ca

7.3.86’. A(Y, )= [tod tip] A(X,A(Y, )) = [tod śa tip]

!= 0. Hence X is Nitya. Similarly, A(X, )= [tud śa tip] A(Y,A(X, )) = 0. Hence Y

is Anitya.

Dec 23rd 2009, HCU, Hyderabad

Determination Formula for Antaraṅga and Bahiraṅga.

Let F(X, ) returns the number of Conditions for sutra X in the state .

if F(X, ) < F(Y, ) then X is Antaraṅga and

Y is Bahiraṅga else Y is Antaraṅga and

X is Bahiraṅga

X = ‘Sarvādīni sarvanāmāni 1.1.27’

Y= ‘Prathamacaramatayālpakatipayanemāśca 1.1.33’

= [ubhaya jas] F(X, )= 1, F(Y, )=2. F(X, ) < F(Y, ),

therefore X is Antaraṅga and Y is

Bahiraṅga

Dec 23rd 2009, HCU, Hyderabad

SummaryWe have tried to show the feasibility of computing of अअअअअअअअअअअ that was claimed to be the first and foremost programming language and also a program in the same language authored sans a machine.

Traditional conflict resolution techniques shown in mathematical formulae will exhibit the computability of अअअअअअअअअअअ a complete and coherent system developed 25 centuries ago in India.

This proves that सससससस is Father of Computation.

Dec 23rd 2009, HCU, Hyderabad

Thanks

ToThe Chair, Organizers, Editors,

Reviewers and Participants