BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help
Not What You Meant?  There are 10 definitions for Production.

Production (computer science)

Print-Friendly
About 1 pages (339 words)

Bookmark and Share Know this topic well? Help others and get FREE products!

A production in computer science is a rewrite rule specifying a symbol substitution that can be recursively performed to generate new symbol sequences. A set of productions specifies a formal grammar, specifically a generative grammar. A special "start symbol" is used to begin the sequence construction, which then proceeds by the substitution of "terminal symbols" (which cannot themselves be the target of substitution) and "non-terminal symbols" (which are available for further substitution). The complete set of terminal-only strings represents the grammar.

Grammar generation

To generate a string in the language, one begins with a string consisting of only a single start symbol, and then successively applies the rules (any number of times, in any order) to rewrite this string. The language consists of all the strings that can be generated in this manner. Any particular sequence of legal choices taken during this rewriting process yields one particular string in the language. If there are multiple different ways of generating a single string, then the grammar is said to be ambiguous. For example, assume the alphabet consists of <math>a</math> and <math>b</math>, the start symbol is <math>S</math> and we have the following rules:

1. <math>S \rightarrow aSb</math>
2. <math>S \rightarrow ba</math>

then we start with <math>S</math>, and can choose a rule to apply to it. If we choose rule 1, we replace <math>S</math> with <math>aSb</math> and obtain the string <math>aSb</math>. If we choose rule 1 again, we replace <math>S</math> with <math>aSb</math> and obtain the string <math>aaSbb</math>. This process is repeated until we only have symbols from the alphabet (i.e., <math>a</math> and <math>b</math>). If we now choose rule 2, we replace <math>S</math> with <math>ba</math> and obtain the string <math>aababb</math>, and are done. We can write this series of choices more briefly, using symbols: <math>S \Rightarrow aSb \Rightarrow aaSbb \Rightarrow aababb</math>. The language of the grammar is the set of all the strings that can be generated using this process: <math>\left \{ba, abab, aababb, aaababbb, ...\right \}</math>.

See also

View More Summaries on Production (computer science)
 
Ask any question on Production (computer science) and get it answered FAST!
Answer questions in BookRags Q&A and earn points toward
discounted or even FREE Study Guides and other BookRags products!
Learn more about BookRags Q&A
Copyrights
Production (computer science) from Wíkipedia. ©2006 by Wíkipedia. Licensed under the GNU Free Documentation License. View a list of authors or edit this article.

Article Navigation
Join BookRagslearn moreJoin BookRags




About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy