Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Classify each of the following languages as either (1) regular, (2) context-free but not regular, or (3) not context free. All languages are over the

Classify each of the following languages as either (1) regular, (2) context-free but not regular, or (3) not context free. All languages are over the alphabet {0, 1, 2}.

(a) The set of strings that, when treated as a base-3 number, is evenly divisible by 7.

1.Regular

2.Context-free but not regular

3.Not context free

(b) The set of strings that, when treated as a base-3 number, is a prime.

1,Regular

2.Context-free but not regular

3.Not context free

(c) The set of strings with an equal number of 0's, 1's, and 2's.

1.Regular

2.Context-free but not regular

3.Not context free

(d) The set of strings with more 0's than 1's (and any number of 2's).

1.Regular

2.Context-free but not regular

3.Not context free

(e) The set of strings in which every 0 and every 1 is immediately followed by a 2.

1.Regular

2.Context-free but not regular

3.Not context free

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions