Ranking and unranking left szilard languages

We give efficient ranking and unranking algorithms for left Szilard languages of context-free grammars. If O(n 2) time and space preprocessing is allowed then each ranking operation is possible in linear time. Unranking takes time O(n log n). These algorithms imply similar algorithms for context-free languages generated by arbitrary unambiguous context-free grammars.