0% found this document useful (0 votes)
12 views

ToA - Lecture 01 02 - Introduction

Uploaded by

wosqa nisar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

ToA - Lecture 01 02 - Introduction

Uploaded by

wosqa nisar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Lecture – 01 & 02

Introduction
My Introduction
• Education
• BS(CS) & MS(CS) from COMSATS University Islamabad
• Work Experience
• Teaching Associate (CS, CUI) [Apr 2016 – Sep 2021]
• Tier 2 Site Administrator (CUI-CERN)
• Faculty Advisor (IEEE Computer Society CUI)
• Data Science Research Associate (AAIP) [Jun 2020 – Dec 2021]
• Lecturer (CS, NUML Rawalpindi) [Sep 2021 – Present]
• Remote R Shiny App Developer (Technical University of Munich, Germany) [Jul 2023 - Present]
• Want to Connect?
[email protected]
• +92 333 020 2222 [Text Only – No Calls Please]
Your Introduction
• Tell me a bit about yourself
• Name
• Hobbies
• What career do you want to make?
• What do you expect from this course?
Class Rules (Actually Life Ethics)
• Be attentive
• Make yourself open for learning
• Class participation
• Expect surprised assessments
• Keep a nice tone (This should be followed in everyday life)
• Be honest to yourself, ultimately you will be honest to everyone.
• Know your responsibilities
• Don’t Cheat, Strive to Learn
• Respect others at all times
Course Material
• Textbooks
• Daniel I. A. Cohen, Introduction to Computer Theory (2nd edition)
• Elaine Rich, Automata, Computability and Complexity: Theory and Applications (latest edition)
• Peter Linz, An Introduction to Formal Languages and Automata (4th edition)
• S. P. Eugene, Kavier, Theory of Automata, Formal Languages and Computation (latest edition)
• John Hopcroft and Jeffrey Ullman, Introduction to Automata Theory, Languages, and Computation
(2nd edition)
• John C. Martin, Introduction to Languages and the Theory of Computation (latest edition)
• Slides
• Mostly will be from the main textbook
• Will be provided but it is good to note down important things in class.
Grading Criteria
Evaluation Marks

Mid-Term Exams 25

End-Term Exams 50

Assignments 5 – 10

Internal Evaluation Quizzes 5 – 10

Project & Presentations 5 – 10

Total 100
Course Contents (First 8 Weeks)
Week Topic

1 Language definitions preliminaries, Descriptive Method

2 Regular Expressions

3 Finite Automata, NFA, DFA

4 Transition Graphs, TG to RE

5 Kleene’s theorem, Union, Intersection & Complement of FA, DFA Minimization

6 Transducers (Mealy Machine, Moore Machine), Conversions

7 Regular languages vs Non regular languages, Properties of regular languages, Pumping Lemma

8 Context free grammars, Derivations, derivation trees and ambiguity


Course Contents (Last 8 Weeks)
Week Topic

9 Simplifying CFL, Normal form grammars and parsing, Decidability

10 Push Down Automata

11 Context sensitive languages, Grammar, Linear bounded automata (LBA)

12 Chomsky’s hierarchy of grammars

13 Turing Machine Theory, Post machine

14 Variations on TM, TM encoding

15 Universal Turing Machine, Defining Computers by TMs

16 Revision
Course Learning Outcomes
• Design and derivation of regular languages using mathematical models
• Design and derivation of non-regular languages using mathematical models
• Design of Turing Machine.
Theoretical Computer Science
• Theoretical computer science – a scientific field on the border between computer science
and mathematics
• Investigation of general questions concerning algorithms and computations
• Study of different kinds of formalisms for description of algorithms
• Study of different approaches for description of syntax and semantics of formal languages (mainly
programming languages)
• A mathematical approach to analysis and solution of problems (proofs of general mathematical
propositions concerning algorithms)
Theoretical Computer Science
• Examples of some typical questions studied in theoretical computer science:
• Is it possible to solve the given problem using some algorithm?
• If the given problem can be solved by an algorithm, what is the computational complexity of this
algorithm?
• Is there an efficient algorithm solving the given problem?
• How to check that a given algorithm is really a correct solution of the given problem?
• What kinds instructions are sufficient for a given machine to perform a given algorithm?
Algorithms and Problems
• Algorithm
• Mechanical procedure that computes something (it can be executed by a computer)
• Algorithms are used for solving problems.
• An example of an algorithmic problem:
• Input: Natural numbers x and y.
• Output: Natural number z such that z = x + y.
Algorithms and Problems
• Algorithm
• Mechanical procedure that computes something (it can be executed by a computer)
• Algorithms are used for solving problems.
• An example of an algorithmic problem:
• Input: Natural numbers x and y.
• Output: Natural number z such that z = x + y.
• A particular input of a problem is called an instance of the problem.
• An example of an instance of the problem given above is a pair of numbers 728 and 34.
• The corresponding output for this instance is number 762.
Problems
• When specifying a problem, we must determine:
• What is the set of possible inputs
• What is the set of possible outputs
• What is the relationship between inputs and outputs
Problem - Sorting
• Input: A sequence of elements .
• Output: Elements of the sequence ordered from the least to the greatest.

• Example
• Input: 8, 13, 3, 10, 1, 4
• Output: 1, 3, 4, 8, 10, 13
Decision Problems
• The problems, where the set of outputs is are called decision problems.
• Decision problems are usually specified in such a way that instead of describing what the
output is, a question is formulated.

• Example:
• Input: A natural number n.
• Question: Is n a prime?
Optimization Problems
• Those problems where for each input instance there is a corresponding set of feasible
solutions and where the aim is to select between these feasible solutions that is some
respect minimal or maximal (or possibly to find out that there are no feasible solutions), are
called optimization problems.

• Example Problem “Finding the shortest path in an (undirected) graph”:


• Input: An undirected graph with edges labelled with numbers, and a pair of
nodes .
• Output: The shortest path from node u to node v.
Algorithmically Solvable Problems
• Let us assume we have a problem P.
• If there is an algorithm solving the problem P, then we say that the problem P is
algorithmically solvable.
• If P is a decision problem and there is an algorithm solving the problem P then we say that
the problem P is decidable (by an algorithm).
• If we want to show that a problem P is algorithmically solvable, it is sufficient to show some
algorithm solving it (and possibly show that the algorithm really solves the problem P).
Algorithmically Unsolvable Problems
• A problem that is not algorithmically solvable is algorithmically unsolvable.
• A decision problem that is not decidable is undecidable.
• Surprisingly, there are many (exactly defined) problems, for which it was proved that they
are not algorithmically solvable.
• Computability theory
• Area of theoretical computer science studying, which problems can be solved algorithmically, and which
cannot.
What is Automata Theory?
• Study of abstract (existing in thoughts or as an idea) computing devices, or “machines”
• Automaton
• An abstract computing device
• Note: A “device” need not even be a physical hardware!
• A fundamental question in computer science:
• Find out what different models of machines can do and cannot do
• The theory of computation
• Computability vs. Complexity
Alan Turing (1912 – 1954)
• Father of Modern Computer Science
• English mathematician
• Studied abstract machines called Turing Machines even before computers existed
• Heard of the Turing test?
Theory of Computation: A Historical Perspective
• 1930
• Alan Turing studied Turing machines
• Decidability
• Halting problem
• 1940 – 1950s
• “Finite automata” machines studied
• Noam Chomsky proposes the “Chomsky Hierarchy” for formal languages
• 1969
• Cook introduces “intractable” problems or “NP-Hard” problems
• 1970
• Modern computer science: compilers, computational & complexity theory evolve
Languages & Grammars
• Languages
• A language is a collection of sentences of finite length all
constructed from a finite alphabet of symbols
• Grammars
• A grammar can be regarded as a device that enumerates the
sentences of a language” - nothing more, nothing less
The Chomsky Hierarchy
Thank You 
Any Questions?

You might also like