WHY THEORY of COMPUTER
SCIENCE
• What are the problem solving
capabilities of a real computer; what
can or cannot be computed – known
as computability or decidability
problem.
• How effectively can one compute on
a computer (time and space and
computer memory- wise).
• How do we know if a particular
grammar is suitable for a
programming language?
• Importance of Unambiguous grammar.
Can we program in Russian, Arabic, or
Sanskrit? The language currently being
used are high level languages like C. C++,
C#, Java, Python, FORTRAN, Visual Basic,
Matlab, etc., and text search language
like HTML (for formatting ) and XML
(meaning of text).
GRAMMAR AND LANGUAGES
• Natural languages. They include an
alphabet, sequence of letters from
alphabet – known as word, body of
words (dictionary). Methods of
combining words, understanding by
a large community. Dictionary
evolves – LOL, OMG, etc. are new
words.
ARTFICIAL LANGUAGE (AL) OR
FORMAL LANGUAGE (FL)
• Simplified models of natural
languages
• To help us communicate with
computers
• Design computer programs and
compilers in a much more rigorous
manner
• Defined in a symbolic form. That is the
symbolic grammar gives all the allowed
words without the use of a dictionary
• There is a closed connection between
various types of artificial languages and
finite state machine (Automata) and
Turing machine.
• Thus there are three basic concepts –
Language, grammars, and automata
(see Chapter 1 of text book (look at
the overview and not details)
LANGUAGE AND GRAMMAR
(CONTINUED) – MORE DETAILS
• Alphabet : Finite set of symbols,
denoted by ∑. Examples are ASCII
(for characters in English) and
Unicode for other languages. Binary
symbols {0, 1}, Morse code (dot and
dash).
• String: a finite sequence of symbols
chosen from alphabet. For example,
00001101 (from binary set),
abracadabra, LOL, OMG, TTYL etc.
• Also CAT, ACT, TAC, TCA. Allowed
strings must be in the dictionary TAC
and TCA are not
• Language – set of strings chosen from
an alphabet and accepted by a
dictionary
• Meaning of a string is external to the
language. For example what is CAT?
Some body outside the language has to
tell the meaning of CAT. Is the string
00001101 represents an ASCII character
or a binary number?