Automata theory: understanding different automata

  • Thread starter Thread starter Avichal
  • Start date Start date
  • Tags Tags
    Automata Theory
AI Thread Summary
The discussion centers on the understanding of automata theory, specifically the differences between regular languages, context-free languages, and Turing-complete languages. Regular languages are recognized as the simplest form of automata, operating with states based on input. However, context-free languages introduce a stack, allowing for more complex operations like counting, which regular languages cannot handle effectively. The need for context-free languages arises from their ability to recognize patterns that regular languages cannot, such as strings with matching numbers of characters (e.g., "ab", "aabb"). This capability is crucial for parsing nested structures in programming languages, where the order and quantity of elements must be maintained. Context-free and Turing-complete languages are essential for addressing complex real-world scenarios that exceed the limitations of regular expressions.
Avichal
Messages
294
Reaction score
0
Move this thread to appropriate sub-forum if not here.

I'm studying automata theory and I'm having trouble understanding different machines or automata.
First one is regular language. This is the simplest machine with different states and we can switch depending on what our input is. Very well till here.

Then comes context-free languages. Now I fail to understand the need to study this machine. Along with different states it has a stack to. So in someway it can count also.
I get a little bit of intuition but not completely.

I don't understand need to study context-free language and turing-complete language? I need the intuition
 
Technology news on Phys.org
I'm sorry you are not finding help at the moment. Is there any additional information you can share with us?
 
My two cents: A stack can provide order of events / operations that is far easier than defining states for every possible sequence. Ten items can be put into 3.6 million different orders (permutations) in a stack. Imagine trying to define a state for each possible order.
 
Regular languages are easy to implement but they are too restrictive for many applications.

You can't describe many "simple" features of the a language using only a regular grammar. For example you can't write a regular grammar that will recognize the (infinite number of) strings

ab, aabb, aaabbb, aaaabbbb ... etc, where the string contains an arbitrary number of a's followed by the same number of b's.

That isn't just a "made up" example. It is the first step towards recognizing if pairs of characters like { } [ ] ( ) are correctly nested (to any depth) in the syntax of a programming language like C, Java, etc.

You could easily write a computer program to recognize strings like the above example, by using a variable to count the number of a's, and then count the same number of b's. In a context-free language, a stack can do that sort of counting operation, by push things onto the stack and popping the same number of things off it.

Context-free languages and Turing complete languages are needed to deal with "real world" situations that are too complex for regular expressions.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top