Professional Documents
Culture Documents
• Why ATM can’t perform other tasks like general computer. That’s why language is important
– Iphone swift language/ objective c language
– Android java language
– Window phone csharp language
• Understanding of system
• Understanding of machine
• How it work systematically
• What will be the input(input is language) ? That help us to understand the system
language
• Letters
1. Character/symbols out of which we build language
for machine, a,b,c,d-z 0,1,2,3,4-9
• Alphabets
1. A set of letters, denoted by sigma Σ
2. Σ = {a,b}
2. set
• String
1. Concatenation of letters
2. Or Sequence of letter
3. Aa, bb, ab, ba
• Language ?
• A set of string with rules
• Rule of every language
• E.g.
• Make a language for machine which strings starts with ‘a’ and end with ‘a’ from
alphabet {a,b}
– Aa
– Aba
– Abbbbaaaaabbbba
– Abababababbbbbbbaaabbbbbbbbbbbbbba
Strings from {a,b}
1. Concatenation of letters
• Aa
• Abbbba
• Baaabbbbaaaa
• aabbbaab
• Abaaaabbaa
• Baa…
Make a language for machine which strings starts with
‘a’ and end with ‘a’ from alphabet {a , b}
• Aa
• aba
• abba
• aBa
• aaba
• aba
1. L1 = {aa , aba , abba , aaba…} this is language with rule
2. English = {home , chair, English , zahid}
3. L2 ={aneela, aqsa, allama, asia, akifa…}
String vs word
• aa
• Bb
• Aba
• abbbbbbbbba
• Abbbbbbbaaabbbaaab
• Ababaab
• aaaaaab
These are string
• But word is aa,aba
1. Because it is permissible in language
2. L1 ={aa,aba, abbbbbbbbba…}
Properties of string
• Empty string
• Length of string
• Reverse of string
• Power of alphabet
• Power of string
• Σ = {a,b} alphabet denoted by Σ
• where m is length/power
Power of string
• Determine the length of string
• {bab}2 bab bab
• ba3b = baaab
Consider the language S*
• Where LanguageS = {a,b}
• Lexicography order
Power of alphabet
• Determines that the string made from
alphabet will be of length equal to power of
alphabet.
• Σ = {a,b}2 or Σ 2 = {aa ab ba bb}
• Σ 2 = {aa ab ba bb}
Power of string
• Determine the length of string
• {baba}2 = baba baba
• ba2b = baab
• Denoted by *
So what is kleene star ?
• Σ 2 = {aa ab ba bb}
– Language
– Or you can say formal language
– Through these three methods
• So far we know what is alphabet
• What is string ?
• What is word
• What is language
– Set of string with rules
How do automata accept or reject the
input ?
• How machine know given input is correct or wrong ?
• Input given by keyboard, touchpad
– B = 12321
– Reverse(B) = 12321
Palindrome = {^,all string A such that reverse(A)} {a to z}
E.g.
PalindromeLanguaeName ={abb, a, b, aa, bb, aaa, aba,
abba, abbba, abbbba…}
• Descriptive definition is a method by which we
define language.
• Can Describe condition imposed on language
• languageName = {definition}
Recursive Definition
• What is recursive definition ?
• How to use this ?
• Will Understand with example
– Positive even numbers
– Palindrome
– Recursion
Automata input
• How automata know to accept or reject
input ?
– It based on rules and language
– Language is must for every machine
– Rules is important
• Int intt🡪 c++ compiler
– Accept or reject input based on rules
• Oop ?????
Recursive Definition
2- Give finite number of rules for constructing
more object in the set from the one we
already know. 2
x+2
• L = {^,a,aa,aaa,aaaa…}
• RE = a+
• L = {+, a+, aa+, aaa+…}
• L = {a,aa,aaa,aaaa…..}
Class task
• String start with a and contain any b letters ?
Example(Concatenation)
• Example:
• String start with a and contain any b letters
• L={a,ab,abb,abbb,abbbb. Abbbbb, abbbbbb…}
• RE = ab*
• Re
= ab+
• ab (concatenation)
• We just learned how to define language with the
help of string.
Class task
• String contains any a or any b ?
• Example:
• String contains a or b only
• L = {a,b}
• RE = (a + b) (union of string) OR
• L1={aa,aba,abba,abbb,abbbba}
• Re= ab*a
• L1={aa,aaa,aaaa,aaaa,aaaaaa}
• Re= aa*a