# Class of linearly parsable languages?

Is there name for class of languages exactly such that their words can be parsed in $O(n)$ by program in conventional Turing-complete language (SML)? (i.e. without backtracking)

Any references?

• By what kind of machine? – Peter Taylor May 29 '11 at 7:27
• @Peter Taylor: For sake of concreteness: by program in SML language (as it has formal definition). Update. – Vag May 29 '11 at 8:21
• Are you asking "what are the languages that are decidable with an algorithm that has linear complexity" ? Linear algorithmic complexity, unlike polynomial complexity, depends heavily on what is the machine you are using. For example, if you convert a multi-tape O(n) turing machine into a single-tape turing machine, the complexity bumps up to O(n²). So you need to provide a precise description of your language (like, if it knows integers, can it do arithmetic operations in constant time ? etc) – mercio May 29 '11 at 14:18
• @chandok: Yes, additional steps while addressing memory is an issue. I already mentioned SML in comments (update). – Vag May 29 '11 at 14:48
• @chandok: "can it do arithmetic operations in constant time?" This issue may be sidestepped by asserting that fixed width arithmetics must be O(1) while arbitrary precision operations O(log(n)). – Vag May 29 '11 at 14:59

I do not know of a specific name for this class of languages.

However, there are many results on grammar types. For example, LR(1) and LL(1) grammars can be parsed in linear time, but using different parsing strategies.

• No, I've mean maximal class, LR1/LL1 are proper CFGs; CFG is exactly PDA recognizable; PDA is one stack machine, but I mean conventional programs which use two stack machines. So, RE and DCFG and LL1/LR1 etc are not answers to my question. – Vag May 28 '11 at 19:17
• What kind of "conventional program" uses two stack machines? By the way, please describe how a Turing machine simulates a PDA in linear time; if you can not, there is no reason to disregard the possibility that maybe the set you are looking for is in fact a subset of CFL. – Raphael May 28 '11 at 22:01
• @Raphael: "What kind of "conventional program" uses two stack machines": I meant two stack machines are Turing-complete so they are equivalent in power to "conventional languages". – Vag May 28 '11 at 22:05
• @Raphael: "no reason to disregard the possibility that maybe the set you are looking for is in fact a subset of CFL" Where I did that? I did not disregard it! I just said RE,LL1,LR1 and DCFG are not answers because of one-stackness. – Vag May 28 '11 at 22:06
• @Raphael: CFL is too small because our class contains langauges like $a^n b^m c^n d^m e^{n+m} f^{|n-m|}$ which clearly are not context free. So what we're looking is not subset of CFL. – Vag May 29 '11 at 13:09

Did you mean linear bounded automata?

• LBA is too powerful because its program may be above O(n). – Vag May 29 '11 at 15:58