RSS Forums RSS
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 4747 | Replies: 0
Reply
Join Date: Sep 2003
Posts: 3
Reputation: fever is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fever fever is offline Offline
Newbie Poster

Help Context-sensitive grammar question :(

  #1  
Sep 27th, 2003
Hi, I was wondering if anyone would be able to give hints of any sort to this question:
"Give a context-sensitive grammar for the language
L = {x#y | y is a substring of x, where x,y є {0,1}* }"

I've got how to get eg. y є {0,1}* by

<S> --> <A><B><C>
<A><B> --> a<A><D> | b<A><E>
<D><C> --> <B>a<C>
<E><C> --> <B>b<C>
<D>a --> a<D>
<D>b --> b<D>
<E>a --> a<E>
<E>b --> b<E>
<A><B> --> є
<C> --> є
a<B> --> <B>a
b<B> --> <B>b

but how do I check that y is in x? when both y and x can use the above method, but how can I restrict it so that the only accepted language is a string x that contains y?
I'm really stuck on this
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:57 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC