Prof. has installed a meme vending machine a machine that will accept coins and dispense a meme - in the class. It accepts any amount of money in pennies (p), nickels (n), and dimes (d) as long as the coins are deposited in non-decreasing order of values. For example, a meme will be dispensed by the machine if the user deposits coins in the order described by the following strings: ppp, n, nd, pnd, pppnndd, d. A meme would not be dispensed by the machine if the user deposits coins in the order described by the following strings: ndp, dp, pnp, ddnn. Consider the alphabet of pennies, nickels, and dimes as E₂ = {p, n, d} where p denotes a Σ2 penny, n denotes a nickel, and d denotes a dime. Let L2 be the language over Σ2 such that L₂= {w coins deposited in the order described in w would dispense a meme.} Therefore, the strings ppp, n, nd, pnd, pppnndd, d are in L2 and strings ndp, dp, pnp, ddnn are not in L₂. 1. Give a regular expression that describes all the strings in the language L₂. 2. Give a regular expressions that describes all the strings not in L₂. 3. Design a DFA or NFA that recognizes the langauge L2.
Prof. has installed a meme vending machine a machine that will accept coins and dispense a meme - in the class. It accepts any amount of money in pennies (p), nickels (n), and dimes (d) as long as the coins are deposited in non-decreasing order of values. For example, a meme will be dispensed by the machine if the user deposits coins in the order described by the following strings: ppp, n, nd, pnd, pppnndd, d. A meme would not be dispensed by the machine if the user deposits coins in the order described by the following strings: ndp, dp, pnp, ddnn. Consider the alphabet of pennies, nickels, and dimes as E₂ = {p, n, d} where p denotes a Σ2 penny, n denotes a nickel, and d denotes a dime. Let L2 be the language over Σ2 such that L₂= {w coins deposited in the order described in w would dispense a meme.} Therefore, the strings ppp, n, nd, pnd, pppnndd, d are in L2 and strings ndp, dp, pnp, ddnn are not in L₂. 1. Give a regular expression that describes all the strings in the language L₂. 2. Give a regular expressions that describes all the strings not in L₂. 3. Design a DFA or NFA that recognizes the langauge L2.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
Step 1
We need to find regular expression and DFA for the given language.
***As per the guidelines only 1st 3 questions are answered. For other questions please post separate queries.
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY