BuyFindarrow_forward

Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

Solutions

Chapter
Section
BuyFindarrow_forward

Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

In 29—47, design a finite-state automaton to accept the language defined by the regular expression in the referenced exercise from Section 12.1.

46. Exercise 38

To determine

Design a finite-state automaton to accept the language defined by the regular expression for all telephone numbers that have three digits, then a hyphen, then three more digits, then a hyphen, and then four digits, where the first three digits are either 800 or 888 and the last four digits start and end with a 2.

Explanation

Given information:

All telephone numbers that have three digits, then a hyphen,then three more digits, then a hyphen, and then four digits,where the first three digits are either 800 or 888 and the lastfour digits start and end with a 2.

Calculation:

Given:

All telephone numbers where the first three digits are 800 or 888 and the last four digits starts with a 2 and end with a 2.

A telephone number contains 3 digits, followed by a hyphen-, followed by 3 digits, followed by a hyphen- and ending with 4 digits.

Let [09] represent all digits 0,1,2,3,4,6,7,8,9.

Let us design an automaton with 14 states s0,s1,...,s13 where s0 is the initial state. We draw each of the state as a circle with the name of the state within the circle. We draw an arrow towards the initial state and draw a second circle within the accepting states.

s0=Initial states1= Input is 8s2= Input is 80

s3= input is 88

s4= Input is 800 or 888s5= input starts with 800 or 888, followed by a hyphen

s6=Input starts with 800 or 888, followed by a hyphen, followed by a digit

s7= Input starts with 800 or 888, followed by a hyphen, followed by 2 digits

s8= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits

s9= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits, followed by a hyphen

s10= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits,         followed by a hyphen, followed by a 2

s11= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits,         followed by a hyphen, followed by a 2, followed by one digit

s12= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits,         followed by a hyphen, followed by a 2, followed by two digits

s13= Input starts with 800 or 888, followed by a hyphen, followed by 3 digits,         followed by a hyphen, followed by a 2, followed by two digits, followed by a 2

s14=Remaining inputs

We then note that the state s13 corresponds with inputs that are telephone numbers where the first three digits are 800 or 888 and where the final four digits start with a 2 and end with a 2, thus s11 is the accepting state

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 12 Solutions

Show all chapter solutions add
Sect-12.1 P-11TYSect-12.1 P-12TYSect-12.1 P-1ESSect-12.1 P-2ESSect-12.1 P-3ESSect-12.1 P-4ESSect-12.1 P-5ESSect-12.1 P-6ESSect-12.1 P-7ESSect-12.1 P-8ESSect-12.1 P-9ESSect-12.1 P-10ESSect-12.1 P-11ESSect-12.1 P-12ESSect-12.1 P-13ESSect-12.1 P-14ESSect-12.1 P-15ESSect-12.1 P-16ESSect-12.1 P-17ESSect-12.1 P-18ESSect-12.1 P-19ESSect-12.1 P-20ESSect-12.1 P-21ESSect-12.1 P-22ESSect-12.1 P-23ESSect-12.1 P-24ESSect-12.1 P-25ESSect-12.1 P-26ESSect-12.1 P-27ESSect-12.1 P-28ESSect-12.1 P-29ESSect-12.1 P-30ESSect-12.1 P-31ESSect-12.1 P-32ESSect-12.1 P-33ESSect-12.1 P-34ESSect-12.1 P-35ESSect-12.1 P-36ESSect-12.1 P-37ESSect-12.1 P-38ESSect-12.1 P-39ESSect-12.1 P-40ESSect-12.1 P-41ESSect-12.2 P-1TYSect-12.2 P-2TYSect-12.2 P-3TYSect-12.2 P-4TYSect-12.2 P-5TYSect-12.2 P-6TYSect-12.2 P-7TYSect-12.2 P-8TYSect-12.2 P-9TYSect-12.2 P-10TYSect-12.2 P-1ESSect-12.2 P-2ESSect-12.2 P-3ESSect-12.2 P-4ESSect-12.2 P-5ESSect-12.2 P-6ESSect-12.2 P-7ESSect-12.2 P-8ESSect-12.2 P-9ESSect-12.2 P-10ESSect-12.2 P-11ESSect-12.2 P-12ESSect-12.2 P-13ESSect-12.2 P-14ESSect-12.2 P-15ESSect-12.2 P-16ESSect-12.2 P-17ESSect-12.2 P-18ESSect-12.2 P-19ESSect-12.2 P-20ESSect-12.2 P-21ESSect-12.2 P-22ESSect-12.2 P-23ESSect-12.2 P-24ESSect-12.2 P-25ESSect-12.2 P-26ESSect-12.2 P-27ESSect-12.2 P-28ESSect-12.2 P-29ESSect-12.2 P-30ESSect-12.2 P-31ESSect-12.2 P-32ESSect-12.2 P-33ESSect-12.2 P-34ESSect-12.2 P-35ESSect-12.2 P-36ESSect-12.2 P-37ESSect-12.2 P-38ESSect-12.2 P-39ESSect-12.2 P-40ESSect-12.2 P-41ESSect-12.2 P-42ESSect-12.2 P-43ESSect-12.2 P-44ESSect-12.2 P-45ESSect-12.2 P-46ESSect-12.2 P-47ESSect-12.2 P-48ESSect-12.2 P-49ESSect-12.2 P-50ESSect-12.2 P-51ESSect-12.2 P-52ESSect-12.2 P-53ESSect-12.2 P-54ESSect-12.3 P-1TYSect-12.3 P-2TYSect-12.3 P-3TYSect-12.3 P-4TYSect-12.3 P-5TYSect-12.3 P-1ESSect-12.3 P-2ESSect-12.3 P-3ESSect-12.3 P-4ESSect-12.3 P-5ESSect-12.3 P-6ESSect-12.3 P-7ESSect-12.3 P-8ESSect-12.3 P-9ESSect-12.3 P-10ESSect-12.3 P-11ESSect-12.3 P-12ESSect-12.3 P-13ESSect-12.3 P-14ESSect-12.3 P-15ESSect-12.3 P-16ESSect-12.3 P-17ESSect-12.3 P-18ES