Alphabet and Languages - PowerPoint PPT Presentation

Loading...

PPT – Alphabet and Languages PowerPoint presentation | free to download - id: 6a0a74-MDcxM



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Alphabet and Languages

Description:

Title: Alphabet and Languages Author: chaudhary Last modified by: Millersville University Created Date: 1/24/1999 6:35:35 PM Document presentation format – PowerPoint PPT presentation

Number of Views:3
Avg rating:3.0/5.0
Date added: 5 September 2019
Slides: 11
Provided by: chaudhary96
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Alphabet and Languages


1
Topics
Alphabet and Strings
  • Strings over alphabet
  • Language Generation
  • Example Languages
  • Language Generation by Concatenation
  • Example Grammars
  • From Grammar to Language

2
Strings Over Alphabet
Let ? be a non-empty set of symbols, called
alphabet. A string is a finite sequences of
symbols taken from ?. The set of all strings
over ? is denoted by ? . The null string is
denoted by ?.
Inductive Constructing of
3
Language Generation
? is a countable (infinite) set.
Let ? 0, 1, construct ? .
? ?, row 1 0, 1 row
2 00, 01, 10, 11, row 3 000, 001,
010, 011, 100, 101, 110, 111 0000, 0001,
0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001,
1010, 1011, 1100, 1101, 1110, 1111
With exception of the first row, elements in the
current row are obtained by right-appending 0 and
1 respectively to each element in the previous
row.
Some of the languages over 0, 1 are ? a
language with no words in it! ? a language
with one word in it, which can be neither written
or pronounced!
4
Example Languages
1, 11, 101, 111, 1001, all odd binary
integers 0, 10, 100, 110, 1000, all even
binary integers 0000, 0011, 0101, 0110, 1001,
1010, 1100, 1111 all 4-bit binary integers with
even parity.
A set of binary integers of a given length is
said to have an even parity if it contains even
number of 1s.
5
Language Generation by Concatenation Examples
A a, b, c the alphabet for languages L and
M. L ab, ac and M a, bc, abc, find (i) LM
(ii)ML
Solution (i) LM aba, abbc, ababc, aca, acbc,
acabc (ii) ML aab, aac, bcab, bcac, abcab,
abcac
Exercise Find the value of L that satisfies the
equation. ?, a, abL b, ab, ba, aba, abb,
abba
L b, ab satisfies the equation.
6
Example Grammars
Grammars
Language
Grammar to generate it
S ? aS S ? ?
ai i? 0


b2j1 j? 0
S ? bbS S ? b
7
Example Grammars Continued
Language
Grammar
S ? aSc S ? b
ajbcj j? 0
S ? aBc B ? bB B ? ?
abjc j? 0
8
From Grammar to Language
Example 3 Let T a, b, c, V S, A, B and
let the productions be
S
aSA
aaSAA
aB
aaBA
aaaBAA
ac
aacA
aaacAA
aacb
aaacbb
9
Even and Odd Parities
A set of binary integers of a given length is
said to have an even parity if it contains even
number of 1s.
A set of binary integers of a given length is
said to have an odd parity if it contains odd
number of 1s.
10
Definition of Grammar
A grammar G is defined as a quadruple ( four
things) G (V, T, S, P), where V is a
finite set of variable (also called
non-terminals), T is a finite set of terminal
symbols, S ? V is a special symbol called the
start symbol, P is a set of productions. The
sets V and T are non-empty and V ? T F. That
is, V and T have no elements in common.
Go Back
About PowerShow.com