0% found this document useful (0 votes)
15 views25 pages

Basics

The document defines fundamental concepts in automata theory including alphabets, strings, languages, and sets of strings of a given length. An alphabet Σ is a non-empty set of symbols. A string is a finite sequence of symbols from the alphabet. The length of a string is the number of symbols it contains. Σ* is the set of all possible strings over the alphabet Σ, including the empty string ε. Σk is the set of strings of length k. A language is a set of strings. Examples illustrate these concepts and distinguish between symbols in an alphabet and strings.

Uploaded by

vintexbiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views25 pages

Basics

The document defines fundamental concepts in automata theory including alphabets, strings, languages, and sets of strings of a given length. An alphabet Σ is a non-empty set of symbols. A string is a finite sequence of symbols from the alphabet. The length of a string is the number of symbols it contains. Σ* is the set of all possible strings over the alphabet Σ, including the empty string ε. Σk is the set of strings of length k. A language is a set of strings. Examples illustrate these concepts and distinguish between symbols in an alphabet and strings.

Uploaded by

vintexbiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Fundamentals of Computer Science

Week 3: Theory of Automata


Dr Golnaz Badkobeh

[email protected]
Definitions
• An Alphabet, Σ is a non-empty set of symbols.
• For example: Σ = {0, 1} is a binary alphabet. Σ = {a, b, .., z} is the
collection of lowercase letters.
• A string or word is a finite sequence of letters drawn from some
alphabet.
• For example: x= 01110101 is a binary string. “Life is good” is also a
string.
• Empty strings denoted by " is a string with zero occurrences of letters.
Empty strings can be from any alphabet.
Definitions
• An Alphabet, Σ is a non-empty set of symbols.
• For example: Σ = {0, 1} is a binary alphabet. Σ = {a, b, .., z} is the
collection of lowercase letters.
• A string or word is a finite sequence of letters drawn from some
alphabet.
• For example: x= 01110101 is a binary string. “Life is good” is also a
string.
• Empty strings denoted by " is a string with zero occurrences of letters.
Empty strings can be from any alphabet.
Definitions
• An Alphabet, Σ is a non-empty set of symbols.
• For example: Σ = {0, 1} is a binary alphabet. Σ = {a, b, .., z} is the
collection of lowercase letters.
• A string or word is a finite sequence of letters drawn from some
alphabet.
• For example: x= 01110101 is a binary string. “Life is good” is also a
string.
• Empty strings denoted by " is a string with zero occurrences of letters.
Empty strings can be from any alphabet.
Definitions
• An Alphabet, Σ is a non-empty set of symbols.
• For example: Σ = {0, 1} is a binary alphabet. Σ = {a, b, .., z} is the
collection of lowercase letters.
• A string or word is a finite sequence of letters drawn from some
alphabet.
• For example: x= 01110101 is a binary string. “Life is good” is also a
string.
• Empty strings denoted by " is a string with zero occurrences of letters.
Empty strings can be from any alphabet.
Definitions
• An Alphabet, Σ is a non-empty set of symbols.
• For example: Σ = {0, 1} is a binary alphabet. Σ = {a, b, .., z} is the
collection of lowercase letters.
• A string or word is a finite sequence of letters drawn from some
alphabet.
• For example: x= 01110101 is a binary string. “Life is good” is also a
string.
• Empty strings denoted by " is a string with zero occurrences of letters.
Empty strings can be from any alphabet.
Definitions
• Length of a string, x, is the sum of occurrences of its symbols,
denoted by |x|.
• For example: if x = 01110101 then |x|= 8, the length of “Life if good”
is 12.
• The set of all strings composed from letters in Σ is denoted by Σ*.
• For example: if Σ = { 0, 1} then Σ*= {", 0, 1, 00, 01, 10, 11, ...}
• The set of all non-empty strings composed from letters in Σ is
denoted by Σ ! .
Definitions
• Length of a string, x, is the sum of occurrences of its symbols,
denoted by |x|.
• For example: if x = 01110101 then |x|= 8, the length of “Life is good”
is 12.
• The set of all strings composed from letters in Σ is denoted by Σ*.
• For example: if Σ = { 0, 1} then Σ*= {", 0, 1, 00, 01, 10, 11, ...}
• The set of all non-empty strings composed from letters in Σ is
denoted by Σ ! .
Definitions
• Length of a string, x, is the sum of occurrences of its symbols,
denoted by |x|.
• For example: if x = 01110101 then |x|= 8, the length of “Life is good”
is 12.
• The set of all strings composed from letters in Σ is denoted by Σ*.
• For example: if Σ = { 0, 1} then Σ*= {", 0, 1, 00, 01, 10, 11, ...}
• The set of all non-empty strings composed from letters in Σ is
denoted by Σ ! .
Definitions
• Length of a string, x, is the sum of occurrences of its symbols,
denoted by |x|.
• For example: if x = 01110101 then |x|= 8, the length of “Life is good”
is 12.
• The set of all strings composed from letters in Σ is denoted by Σ*.
• For example: if Σ = { 0, 1} then Σ*= {", 0, 1, 00, 01, 10, 11, ...}
• The set of all non-empty strings composed from letters in Σ is
denoted by Σ ! .
Definitions
• Length of a string, x, is the sum of occurrences of its symbols,
denoted by |x|.
• For example: if x = 01110101 then |x|= 8, the length of “Life is good”
is 12.
• The set of all strings composed from letters in Σ is denoted by Σ*.
• For example: if Σ = { 0, 1} then Σ*= {", 0, 1, 00, 01, 10, 11, ...}
• The set of all non-empty strings composed from letters in Σ is
denoted by Σ ! .
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Definitions
• The set of all strings of length k composed from letters in Σ is denoted
by Σ " .
• For example: Σ = {0, 1} then Σ # = {00, 01, 10, 11}.
• Σ $ = 000, 001, 010, 011, 100, 101, 110, 111 .
• Size of Σ " = |Σ|"
• A language is a collection of strings over an alphabet.
• For example: the language of palindromes over the binary alphabet is
{", 0, 1, 00, 11, 000, 010, 101, 111,…}
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.
Examples
• If Σ = {$, &, '} then what is Σ ! ?
• There must be 3! = 9 strings in this set.
• Σ ! = aa, ab, ac, ba, bb, bc, ca, cb, 'c .
• What about Σ" ?
• Σ" has three strings. Σ" = $, &, '
• Is Σ" the same as Σ?
• The answer is no! Elements in Σ are called symbols and they are letters
whereas the elements in Σ" are strings they just happen to have length 1.
• Do not mix types in programming.

You might also like