Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the question relating to regular expression: (b) Marvellous Marketing has some company rules about mobile phone numbers. While such numbers can be any

Here is the question relating to regular expression:

image text in transcribed
(b) Marvellous Marketing has some company rules about mobile phone numbers. While such numbers can be any nonempty sequence of digits, there are certain subsequences of numbers which are forbidden, and certain others that are particularly favoured. 0 Forbidden numbers include any which contain 911, 666 or a sequence of at least 4 consecutive 8's. 0 Favoured numbers include any that contain 55, 77 or at least 3 8's (in any order). i. Show there is an overlap between forbidden and favoured numbers by giving three examples of numbers which are both. ii. Give a regular expression for favoured numbers. iii. Give a regular expression for forbidden numbers. iv. If R1 is a regular expression for favoured numbers and R2 is a regular expression for forbidden numbers, give a regular expression for a non empty sequence of numbers, each of which is either forbidden or favoured. v. Marvellous Marketing announces that all numbers which are neither for bidden nor favoured are ordinary. Does a regular expression exist for ordinary numbers? Justify your answer (but there is no need to explicitly construct such a regular expression, if it exists)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finite Geometry And Combinatorics

Authors: F De Clerck ,J Hirschfeld

1st Edition

0521448506, 978-0521448505

More Books

Students also viewed these Mathematics questions

Question

Why is simplicity important in business visuals? [LO-1]

Answered: 1 week ago