4
$\begingroup$

The BNF is defined as followed:

S -> aAb | bBA  A -> ab | aAB B -> bB | b 

The sentence is:

aaAbBb 

And this is the parse tree: enter image description here

Phrases: aaAbBb, aAbB, bB
Simple Phrases: bB
Handle: ?

From the book, handle is defined as followed: B is the handle of the right sentential from y = aBw if and only if:
$S ->_{rm} \cdot aAw ->_{rm} aBw$

So in my case, what's the handle? Any idea?

Thanks,
Chan

  • 0
    Does this go here, or on http://cstheory.stackexchange.com/?2011-02-18
  • 0
    @Orbling It's not at a high enough level to belong cstheory, but it doesn't seem correct for this site either.2011-02-18
  • 0
    @Brandon Carter: I don't like there being a level requirement on the sites, unless they are specific overflow in the upwards direction. If it is not suitable for cstheory, then perhaps SO or maybe programmers? Problem is, it uses MathJaX, which only works here... :-/ *(for some ungodly reason!)*2011-02-18
  • 0
    I tried cstheory yesterday, but people there said this type of question is not suitable because its low level. I also tried SO before, but no one there is interested in cs theory. :( ! What can I do?2011-02-18
  • 0
    @Orbling Unfortunately this problem is regarding the structure of language, while SO and programmers.SE tend primarily towards development type questions. It's most fitting by subject for cstheory.SE, but remains too low level. In short, I agree the system isn't perfect.2011-02-18
  • 0
    @Orbling: There are discussions on cstheory to set up a new site for beginner compsci, but so far there's opposition from above. Meanwhile I think the best place is here.2011-02-18
  • 3
    @Yuval Filmus: I really hope cstheory will open a section for newbies, since the CS theory is not easy to be self-taught, plus , why limits it to only graduate level.2011-02-18
  • 0
    @Chan: They will be flooded with elementary questions, and the filtering afforded by the web interface isn't helpful enough.2011-02-18
  • 0
    @Chan: I can't figure out the definition of "handle". I don't know what's a "right sequential form". I'm sure the idea of handle is very simple, and if you look at examples in your textbook then you will immediately see what it is. I could get "phrases" and "simple phrases" by looking at your examples, but all this terminology isn't standard (at least "across CS").2011-02-18
  • 0
    I hypothesize that this "handle" is either the left-most non-terminal or right-most non-terminal, probably the former. So it's probably A.2011-02-18
  • 0
    @Yuval Filmus: It is very annoying the elitism that goes on many of the sites. I am always disappointed that the mathematics site is exclusively used for degree-level plus questions. An occasional low-level question comes along, and is not discouraged, but the answers tend to be overly complex for the level required by the askers. The need for Q&A at a lower level is just as great.2011-02-18
  • 0
    @Yuval Filmus: The textbook was very confusing. It only provided exactly one example, demonstrating how to find phrases and simple phrases, but only mentioned briefly about handle. When I get home, I will read it again, and many thanks for your help.2011-02-18
  • 0
    @Orbling: It's not elitism but genuine lack of interest. The purpose of mathoverflow is not to help you with your homework, but to stimulate collaboration among researchers.2011-02-18
  • 0
    @Yuval Filmus: Well, apart from the fact this is not MathOverflow, sounds like there is a need for a less highbrow variant.2011-02-18
  • 0
    @YuvalFilmus I think that comment was aimed at this site rather than MathOverflow (where it's understandable that there's no interest in answering low level questions). Sometimes an answer is given here which is too advanced for the person posing the question. It could be argued that the purpose of this site is to curate questions and answers for future visitors, rather than to answer questions for the benefit of the person asking them, but both needs should be addressed.2012-03-13
  • 1
    I have cross-posted this question onto http://cs.stackexchange.com/questions/290/understanding-texthandle-in-parsing-problem which is probably a better SE for these types of questions, and as an effort to seed the site which is currently in private beta with useful content.2012-03-13

1 Answers 1