Dijkstra S Algorithm for Finding the Shortest Path

Total Page:16

File Type:pdf, Size:1020Kb

Dijkstra S Algorithm for Finding the Shortest Path

1. Languages V - an alphabet, a non-empty finite set consisting of symbols V *- the set of all words over V L V *- a language over V (any subset of V *) 2. Grammars A grammar G consists of V - an alphabet V T - the set of terminal symbols, a non-empty subset of V S - the start symbol, a non-terminal element of the alphabet P - a finite list of productions of the form   , where  contains a non-terminal symbol and ,  V * 3. Derivations v w - v derives w, if there is a production   , such that v contains an instance of  , and w is obtained from v by replacing this instance of  by  v* w - v derives w in finite number of steps (including zero steps) 4. Languages Generated by Grammars * * L( G ) { w  VT | S  w } 5. Examples (i) G : S  , S aS , S bS ,S cS L( G ) { a , b , c }* (ii) G : S b , S aS L( G ) { an b | n  } (iii) G : S  , S aS L( G ) { an | n  } (iv) G : S  , S aSb L( G ) { an b n | n  }

Recommended publications