Question: Design An Automatic Selling Machine Design a machine selling three types of drinks d1, d2, d3 and three types of snacks s1, s2. The buyers

Design An Automatic Selling Machine

Design a machine selling three types of drinks d1, d2, d3 and three types of snacks s1, s2. The buyers can use four types of coins c1, c2, c3, c4. The number of each drink or snack that a buyer can buy once from the machine is n1, n2. Suppose that there are places in the machine for inserting coins, selecting the type of the drinks or snacks, and picking the number of the drink or stack. At the end, the buyer has to push a button S for machine to start the process. A buyer has to follow the designed order to buy the drinks or snacks, e.g., first insert coins, then select the type of drinks or snacks, then pick the number of the drink or snack that the buyer selected, and finally push the button S to start the process; some part/parts can be repeated. Design the machine with the following stages: (1)Suppose that = {d1, d2, d3, s1, s2, c1, c2, c3, c4, n1, n2}. Design the regular expression r such that L(r) is the language which contains the strings that buyers enter the machine. (2)Design an NFA which accept the language L(r).(3)Design a regular grammar to generate the language equivalent to L(r).(4)Convert the NFA to DFA (5)Implement the DFA in (4) use C# or Java : read a string and output of accept or rejectRequirement for the project:The report contains: (i) stepwise instructions telling how to use the machine, (ii) detailed explanation for each of (1), (2), (3), (4), (iii) Code for (5), (iv) testing page which shows that the machine accepts the strings that belong to L(r) and reject the strings which dont belong to L(r).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!