subject

Write a program in java:

simplification of context-free grammars

1. removing ε-rules
2. remove unit- rules
3. remove useless rules

in this project, accept a cfg from keyboard, simplify it by removing ε-rules and useless rules, and print out the simplified equivalent cfg.

for example, given the following cfg as the input (0 denotes empty string and "—" denotes arrow head "→"):

s—aa|abb a—aaa|0 b—bb|bbc c—b

after processing, your program should print out the following simplified equivalent cfg: s—aa|a

a—aaa|aa

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Technician a says that the radiator usually cools better if the front air dam is removed. technician b says that when a condenser has a leak it can be repaired easily with epoxy. who is correct?
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
You know the right answer?
Write a program in java:

simplification of context-free grammars

1. removin...
Questions
Questions on the website: 13722361