Ambiguity Detection A simple rewriting system can be used to characterize a certain language (set of strings). For example, consider the following set of rewrite rules (can be used to represent programming language syntax): (ِA -%26gt; x A y) , (A -%26gt;xy) , (A -%26gt; xxyy) Starting from the symbol A, we can generate all sorts of strings of the form x...xy...y where the number of x’s and that of y’s are the same. One tricky point about this type of formulation is that the system can be ‘ambiguous’. For example, the above system can generate ‘xxxyyy’ also by applying Rule 1 once and then Rule 3 once. Naturally, ambiguous systems could cause a lot of trouble for precise representation of a language and also for processing the language. Could you construct a general way to detect whether this type of system is ambiguous?
I need to write a c program that detect Ambiguity.?
I see you want us to do your homework... It's not gonna happen.
There's an easy way out: just answer the last question with 'No.' That answer would be correct and complete, and should therefore give you full credit.
Reply:Computers can not think. The brain, microprocessor has got a set of instructions and everything finally bolis down to that. There can not be one instruction to do 2 different things.
This is a future challenge and has been debated by mathematicians for 100s of years. I think a great mathematician has given a similar problem to design a real computer which can detect a liar.
"If i say, i am a liar, will you believe it ?". It is impossible to write a program to answer this Q. Because it has several interpretations and emotions which can not be put in words.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment