# Efficient learning of real time one-counter automata

## Abstract

We present an efficient learning algorithm for languages accepted by deterministic real time one-counter automata (ROCA). The learning algorithm works by first learning an initial segment, *B*_{ n }, of the infinite state machine that accepts the unknown language and then decomposing it into a complete control structure and a partial counter. A new, efficient ROCA decomposition algorithm, which will be presented in detail, allows this result. The decomposition algorithm works in time *O*(*n*^{2}*log*(*n*)) where *nc* is the number of states of *B*_{ n } for some language-dependent constant *c*. If Angluin's algorithm for learning regular languages is used to learn *B*_{ n } and the complexity of this step is *h(n, m)*, where *m* is the length of the longest counterexample necessary for Angluin's algorithm, the complexity of our algorithm is *O(h(n,m)* + *n*^{2}*log*(*n*)).

## Keywords

State Machine Finite State Machine Regular Language Exit Point Input String## Preview

Unable to display preview. Download preview PDF.

## References

- 1.Angluin, D.: Learning regular sets from queries and counter examples. Information and Computation
**75**(1987) 87–106CrossRefGoogle Scholar - 2.Berman, P., Roos, R.: Learning one-counter languages in polynomial time.
*Proceedings of the 28th IEEE Symposium on Foundations of Computer Science*(1987) 61–67Google Scholar - 3.Biermann, A.W.: A fundamental theorem for real time programs. Duke Univerity Department of Computer Science technical report (1977)Google Scholar
- 4.Fahmy, A. F., Biermann, A. W.: Synthesis of real time acceptors. Journal of Symbolic Computation
**15**(1993) 807–842Google Scholar - 5.Fahmy, A. F.:
*Synthesis of Real Time Programs*. PhD thesis, Duke University, 1989Google Scholar - 6.Hartmanis, J., Stearns, R.E.:
*Algebraic Structure Theory of Sequential Machines*. (1966: Prentice-Hall)Google Scholar - 7.Main, M., Lorentz, R.: An
*O*(*n*log(*n*)) algorithm for finding all repetitions in a string.*Journal of Algorithms***5**(1984) 422–432CrossRefGoogle Scholar - 8.Roos, R.:
*Deciding Equivalence of Deterministic One-Counter Automata in Polynomial Time with Applications to Learning*. PhD thesis, The Pennsylvania State University, 1988Google Scholar - 9.Valiant, L. G., Paterson, M. S.: Deterministic one-counter automata.
*Journal of Computer and System Sciences***10**(1975) 340–350Google Scholar