×

Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

Theory of Computation

by: Dr. Humberto Beier

29

0

4

Theory of Computation 22C 135

Dr. Humberto Beier
UI
GPA 3.87

Staff

These notes were just uploaded, and will be ready to view shortly.

Either way, we'll remind you when they're ready :)

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

COURSE
PROF.
Staff
TYPE
Class Notes
PAGES
4
WORDS
KARMA
25 ?

Popular in ComputerScienence

This 4 page Class Notes was uploaded by Dr. Humberto Beier on Friday October 23, 2015. The Class Notes belongs to 22C 135 at University of Iowa taught by Staff in Fall. Since its upload, it has received 29 views. For similar materials see /class/228060/22c-135-university-of-iowa in ComputerScienence at University of Iowa.

×

Reviews for Theory of Computation

×

×

What is Karma?

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/23/15
22C2135 Fall 2001 Contextsensitive Examples This document presents three examples of contextsensitive grammars They are drawn from the book Models of Computation and Formal Languages by R G Taylor Example 1112 The language L a39ch39dJ ij21 is not contextfree There do exist grammars that generate L however Here is one 8 gt AB A gt aAX aX B gt de bYd Xb gt bX XY gt Yc Y gt 8 The logic of the grammar is basically as follows The productions for nonterminal A will be used to x the value ofi while the productions for nonterminal B will x the value of Each occurrence of nonterminal X is replaced with terminal c but not before the production Xb gt bX has been used to position it between the bs and ds Nonterminal Y serves as a placemarker situated between the bs and the ds and can hence be used in positioning the Xs The problem of course as the reader will likely have noticed is that this grammar is not quite contextsensitive given the production for nonterminal Y editor s note Taylor de nes a context sensitive production or gt B to be one where enocslenB But it is fairly easy to obtain an equivalent grammar that is contextsensitive by adjusting the productions for S iii S gt aAB aB iiiiv A gt aAX aX vvi B gt de bYd vii Xb gt bX viii XY gt Yc ix Y gt c Placemarker Y is now itself being replaced with terminal 0 so we do not need quite so many occurrences of nontermional X A derivation ofword aabbbccddd appears below 8 gt aAB by i gt aaXB by iv gt aaXXde by v gt aaXbded by v gt aaXbbbYddd by vi gt aabXbbYddd by vii gt aabebYddd by vii page lof 3 22C2135 Fall 2001 gt aabbeYddd by vii gt aabbbchdd by viii gt aabbbccddd by ix It should be apparent that every derivation ofa word over 2 abcd will terminate with an application of production ix Moreover by the time ix is used to eliminate nonterminal Y all occurrences of nonterminal X must already have been converted to cs once Y has disappeared production viii will no longer be applicable Example 1113 The language L a39chk 1sisjsk is not contextfree Again There do exist grammars that generate L however One such grammar has the 10 productions S gt aS39bX abX S39 gt aS39bC S39bC S39C bC C Cb gt bC CX gt Xc X gt c The productions for S and S39 are rst used to x the values i j and k in effect Nonterminal X is introduced as a placemarker situated immediately to the right of all the bs Precisely as in the preceding Example 1112 occurrences of nonterminal C are moved to the right past the bs before being converted to cs Finally placemarker X is itself converted to 0 Example 1114 We previously considered the theoretical linguist s use of contextfree grammars in giving an account of the syntax of English We close the present section with a brief discussion ofthe application within linguistics of contextsensitive rules As an easy illustration we describe the potential of such rules to interpret the phenomenon of subjectverb agreement with respect to number that is singular or plural as re ected in sentences a The child runs b The men run To this end we introduce the following rules editor s note syntax categories are S for sentence NP for nounphrase VP for verbphrase N for noun V for verb and Det for determiner S gt NP VP NP gt Det Nsing Det Nplur N VP gt N V Nplur VP gt N V Det gt the ng sMg ng er Mm page 20f 3 22C2135 Fall 2001 N N V V gt child gt men sing plur sing gt runs plur gt run Note that the fourth and fth rules here are contextsensitive but not contextfree Although it is possible to account for the subjectverb agreement using context free rules only the two contextsensitive rules capture neatly our intuition that the number ofthe subject determines that ofthe verb page 30f 3 2201135 Fall 2001 Summary of Language Decision Problems Various results concerning decision problems are summarized in the table below An entry 39D39 denotes that the problem is decidable for members ofthe category 39Uquot denotes that it is undecidable and 39NA39 indicates that decidability is not applicable Language Xe L L L in nite L2 L1mL2 L1L2 Ambig category Reg D D D D D D D DCF D D D D U U NA CF D D D U U U U CS D U U U U U NA total Turing D U U U U U NA recog partial Turing U U U U U U NA recog PS

×

25 Karma

×

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over \$500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Jim McGreen Ohio University

Forbes

"Their 'Elite Notetakers' are making over \$1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!
×

Refund Policy

STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com