A problem with a given Syntax!

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Oct 2004
Posts: 3
Reputation: HSN is an unknown quantity at this point 
Solved Threads: 0
HSN HSN is offline Offline
Newbie Poster

A problem with a given Syntax!

 
0
  #1
Oct 9th, 2004
Hi guys,

I have a problem with the following syntax:

T -> T , k , T
T -> nil
T -> number


This is a BNF rule for binary trees. Assuming that nil and number are tokens, I need to remove the ambiguity of this grammar without restricting the structure of the Binary Tree. Note that the two recursive refrences to T should remain; in the first rule.

I really couldn't solve this problem. Who can help me?!
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3
Reputation: HSN is an unknown quantity at this point 
Solved Threads: 0
HSN HSN is offline Offline
Newbie Poster

Re: A problem with a given Syntax!

 
0
  #2
Oct 11th, 2004
No ONE can answer this?!! :mrgreen:
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,630
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 718
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: A problem with a given Syntax!

 
0
  #3
Oct 12th, 2004
>No ONE can answer this?!!
You can't answer it, why should you expect anyone else to? Anyway, have you tried something along these lines?
T ::= T, K, T |
      nil
Or were you just waiting on someone else to do your research for you?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4
Reputation: Den Watts is an unknown quantity at this point 
Solved Threads: 0
Den Watts Den Watts is offline Offline
Newbie Poster

Re: A problem with a given Syntax!

 
0
  #4
Oct 14th, 2004
I think it's a wee bit unfair, if he knew how to solve it, he wouldn't put the question. I find it quicker to solve a question then to get on the computer and type it. Beside, the fact that some studentd expect other people to solve their home work doesn't mean that all the students are the same !
Den Watts, King of the world
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,630
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 718
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: A problem with a given Syntax!

 
0
  #5
Oct 14th, 2004
>I think it's a wee bit unfair
Life isn't fair. Deal.

>the fact that some studentd expect other people to solve their home work doesn't mean that all the students are the same
I don't recall ever saying that they were. But the majority that come crying to us for help are, which is why I savor the very rare student that actually cares about learning and has an honest problem and a good question about it.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3
Reputation: HSN is an unknown quantity at this point 
Solved Threads: 0
HSN HSN is offline Offline
Newbie Poster

Re: A problem with a given Syntax!

 
0
  #6
Oct 16th, 2004
what ru talking about?!
It's not a homework!! It's just a problem that we discussed with some professor and he asked if we can solve it or not. I tried my best but I couldn't, if you donno how to solve or u don wanna solve it, please don't write anything in the thread Because it's out of your range
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,630
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 718
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: A problem with a given Syntax!

 
0
  #7
Oct 16th, 2004
>It's just a problem that we discussed with some professor and he asked if we can solve it or not.
That sounds a lot like homework to me. Just because you aren't being graded on it doesn't mean that begging for the answer is a valid solution.

>I tried my best but I couldn't
What did you try? Trying your best is a very vague measure. In fact, I've helped people who thought that trying their best was posting a request for the complete solution on a forum like this one. I've been doing this for a while, and as you can imagine, it gets tiresome seeing the same thing over and over:
Hello, here is my problem: <Insert problem here, usually a direct copy of the homework assignment or similar>

I tried really really really hard to solve it, but I couldn't come up with anything. <Notice the lack of detail about what was tried>

So since I can't do it, why don't you do it for me? Then I can change it around a lot to make it look like something I'm capable of so I can palm it off as my work.

Thanks in advance for being a dumbass and hurting me down the road by giving me something that I should figure out on my own.
>if you donno how to solve or u don wanna solve it
I do, and I did. If you took the stick out of your ass and chilled out then you would see that I gave you a valid suggestion amid the annoyed comments about your ability to research problems.

>Because it's out of your range
Yes, it's sooo out of my range. :rolleyes: Tell me, who was asking the question and who was answering it? Let's see, you and me, respectively.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC