Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Re: Re: Re: original definition vs final language

by thraxil (Prior)
on Oct 25, 2002 at 17:46 UTC ( [id://208095]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: original definition vs final language
in thread original definition vs final language

i think you're misunderstanding the meaning of the word 'context' in the term 'context-free grammar'. 'context' isn't the same as 'memory'. check out this wikipedia entry for a decent discussion of CFGs.

i've had the idea of writing an article on formal language and automata theory aimed at perl programmers floating around in the back of my mind for a while. maybe i should get around to doing that soon.

the short version as it relates to the topic at hand is this: a Finite Automata is a state machine with a finite number of states. it essentially has 'memory' equal to the number of states in its definition. a pushdown automata is a state machine that uses a stack to store its state so it can essentially have infinite 'memory'. however, because it can only push and pop the stack, it doesn't have a sense of 'context'; it can only see what's at the top of the stack. beyond pushdown automata there are turing machines which use a tape and can access it at any point, so they are able to have a sense of 'context'. languages are defined by the kind of automata that accept them: regular languages are accepted by finite automata, context-free languages are accepted by pushdown automata, context-sensitive languages are accepted by finite turing machines, and recursively enumerable languages are accepted by infinite turing machines. the mapping of languages to machines and how it all fits together is called the Chomsky Hierarchy.

that was a gross simplification of the whole thing. hopefully i can make up for it with a full article in the near future.

anders pearson

  • Comment on Re: Re: Re: Re: Re: Re: original definition vs final language

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://208095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found