Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Theory of automata
1. Assignment:Theory of Automata
QN0.1: Write the Descriptive Language of the followingLanguage over alphabetΣ = {a,b}
Language containing no words starting and ending on “a”.
Ans: L = {ba,bb,ab,......}
Languages containing only words starting and ending on same letter
Ans: L = {ab,bb,ba,......}
Language ofall words with a appears in pairs only
Ans: L = {aa,aaaa,aaaaaa,......}
Language ofall words not ending on “b”
Ans: L = {a,ba,aba,......}
Language ofall words with count of “a “ as multiple ofthree
Ans: L = {aaa,aab,aba,......}
Name MudassarRasool
RollNo. BCSM-F15-038
Class BCS-5A
Assignment Theory of Autometa
Submitted to: Ms. Maryam
2. Assignment:Theory of Automata
EVEN-ODD
Ans: L = {a,b,aa,bb,......}
Q#02. L2 is a language defined over alphabet Σ ={a,b} as “language of all words where a never
appears after b”; now list describe the language in your own words. Create a table of with three
columns named i. Word ii. Word is in L2 or Not iii. Why?
ANS:
L = {a,aa,ab,aab,……..}
In this language a must b appear first of b example ab,aab, etc.
Word Word is in L2 or Not Why?
Now mention five words that are part of language and five words that are not.
part of language Not part of language
1) a is a part of language
2) B is a part of language
3) Ab isa part of language
4) aab is a part of language
5) Aabbis a part of language
1) ba is a not part of language
2) aba is a not part of language
3)s bba isa not part of language
4) aaba is a not part of language
5) bbaa isa notpart of language
Q#03: Write down recursive definition of following languages over alphabet
Σ={0,1}:
a. Language ofall words with odd length (L1)
Ans:
L = {0,1,000,111,……}
Step 1:0 and 1 are in L
Step 2: (000)and (111) are also in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
3. Assignment:Theory of Automata
b. Language ofall words not ending in ‘0’ (least length ofword is one)
Ans:
L = {o,1,….}
Step 1: 0 and 1 are in L
Step 2: (0)and (1) are also in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
c. Language ofall words with where length NOTmultiple ofthree (least length ofword
is one)
Ans:
Step 1: 0 and 1 are in L
Step 2: (000)and (111) are not in L, where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L
d. EVEN-EVEN or ODD-ODD
Ans:
Step 1: 0 and 1 are in L
Step 2: If 0 is in EVEN then 0+2 and 0-2 are also in EVEN.
Or if 1 is odd 1+2 and 1-2 are also odd.
Step 3: No strings except those constructed in above,are allowed to be in L
e. Language ofall words where ‘0’ appears at most once
Ans:
L = {0,01,10,….}
Step 1: 0 and 1 are in L
Step 2: If (0)s(0) is L .where L belongs to Σ*
Step 3: No strings except those constructed in above,are allowed to be in L