Question
a) A Context Free Grammar defines the structure of some language. Design CFG for (Natural Language) interrogative and negative sentences Test for various sentences such
a) A Context Free Grammar defines the structure of some language.
Design CFG for (Natural Language) interrogative and negative sentences Test for various sentences such as: - Who are you? - What is this? - You should not eat this food - Why didn't you report
b)Design a DFA that describes the behavior of a vending machine which accepts Rupees and coins, and charges PKR 50.50 per soda. Once the machine receives at least PKR 50.50, it will allow the user to select a soda. Self-loops represent ignored input: the machine will not dispense a soda until at least PKR 50.50 has been deposited, and it will not accept more money once it has already received greater than or equal to PKR 50.50.
Required Deliverables - Complete CFG - Leftmost, Rightmost trees to show that CFG is unambiguous - In case of second part a complete description and analysis of the designed mealy model along with coding.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started