Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 1 2 marks ) Based on our discussion of strings and languages in class, list all of the strings in each of the languages

(12 marks) Based on our discussion of strings and languages in class, list all of the strings in
each of the languages below. A first example is provided for you. See the bottom of the page for
some reminders of definitions, etc.
L ={0
m1
n
| m, n in Z
nonneg, m + n =5}
Answer: L ={00000,00001,00011,00111,01111,11111}
(a) L1={0
m1
n | m, n in Z
nonneg, n <=2, m <= n}
(b) L2={a
mb
n | m, n in Z
nonneg
,2<= n <=6, n is a multiple of m}
(c) L3={a
nb
2n1c
3n2
| n in Z
+, n <=3}
(d) L4={w in {a, b}
||w|<=3 and w is a palindrome}
(A palindrome is a string that is the same backwards and forwards, such as radar, racecar,
sees, abbababba and a.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions