   Chapter 12.2, Problem 45ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### 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. 45. Exercise 37

To determine

To design a finite-state automaton to accept the language defined by the regular expression.

Explanation

Given information:

All United States social security numbers (which consistof three digits, a hyphen, two digits, another hyphen, and finally four more digits), where the final four digits start with a 3 and end with a 6.

Calculation:

Given:

All social security numbers where the final four digits start with a 3 and end with a 6.

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

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

Let us design an automaton with 13 states s0,s1,...,s12 where s0 is the initial state. We draw each of the states 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 has one digits2= Input has two digits

s3= input has three digits

s4= Input has three digits, followed by a hyphens5= input has three digits, followed bya hyphen, followed ba a digit

s6=Input has three digits, followed by a hyphen, followed by 2 digits

s7= Input has three digits, followed by a hyphen, followed by 2 digits, followed by a hyphen

s8= Input has three digits, followed by a hyphen, followed by 2 digits,         followed by a hyphen, followed by a 3

s9= Input has three digits, followed by a hyphen, followed by 2 digits,         followed by a hyphen, followed by a 3, followed by one digit

s10= Input has three digits, followed by a hyphen, followed by 2 digits,         followed by a hyphen, followed by a 3, followed by two digits

s11= Input has three digits, followed by a hyphen, followed by 2 digits,         followed by a hyphen, followed by a 3, followed by two digits, followed by a 6

s12=Remaining inputs

We then note that the state s11 corresponds with inputs that are social security numbers where the final four digits start with a 3 and end with a 6, 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 