You are on page 1of 38

Theory of Computation

Romi Satria Wahono


romi@romisatriawahono.net
http://romisatriawahono.net/tc
Mobile: +6281586220090

Romi Satria Wahono


SD Sompok Semarang (1987)
SMPN 8 Semarang (1990)
SMA Taruna Nusantara Magelang (1993)
B.Eng, M.Eng and Ph.D in Software Engineering from
Saitama University Japan (1994-2004)
Universiti Teknikal Malaysia Melaka (2014)
Research Interests: Software Engineering,
Machine Learning
Founder dan Koordinator IlmuKomputer.Com
Peneliti LIPI (2004-2007)
Founder dan CEO PT Brainmatics Cipta Informatika
2

Textbooks

Forum Diskusi
Group FB: http://facebook.com/groups/intelligentsystems
/

Sistem Penilaian Mata Kuliah


1. Penyelesaian exercise dan keaktifa
n di setiap pertemuan kelas (Activiti
es)
2. Penugasan (Assignments)
3. Penulisan Makalah Ilmiah (Scientifi
c Paper)
4. Penugasan dan Penulisan Makalah
Dikirim Melalui Card di Trello.Com
6

Course Outline
1. Introduction
2. Math Fundamental 1: Set, Sequence,
Function
3. Math Fundamental 2: Graph, String,
Logic
4. Finite Automata
5. Pushdown Automata
6. Turing Machine
7

1. Introduction
1.1 Observation, Law and Theory
1.2 What is Theory of Computation?

1.1 Observation, Law and Th


eory

Computation is what
Computers do, who needs
theory?

10
Charles Babbages
Difference Engine (1822)

Computation is what Computers


do, who needs theory?
Babbage terinspirasi oleh Wilhelm Schickar
d, Blaise Pascal, dan Gottfried Leibniz (164
2)
Babbage menginspirasi Howard H. Aiken yan
g bekerjasama dengan IBM membuat mesin
Mark I (1937)
Dua tahun sesudah Mark I dioperasikan (194
6), kelompok insinyur dan penemu lain meny
elesaikan ENIAC, komputer elektronik perta
ma
11

Engining is what Engines do,


who needs theory?

Hero of
Alexandrias
aeolipile steam
engine

Matthew Boulton and James Watt steam engine, 1

12

Engining is what Engines do,


who needs theory?
Thomas Savery (1650-1715) adalah orang Inggris ya
ng membuat mesin uap bolak-balik pertama, mesin i
ni tidak populer karena mesin sering meledak dan sa
ngat boros uap
Denis Papin (1647-1712) membuat katup-katup pen
gaman dan mengemukakan gagasan untuk memisah
kan uap air dan air dengan menggunakan torak
Gagasan Papin direspons oleh Thomas Newcomen (
1663-1729) yang merancang dan membangun mesi
n menggunakan torak
James Watt selama kurang lebih 20 tahun ia menge
mbangkan dan memperbaiki kinerja dari mesin New
comen. Gagasan James
Watt yang paling penting ad
13

Nicolas Carnot (1796 1832)


Is the potential work av
ailable from a heat sour
ce potentially unbound
ed?
Can heat engines be im
proved by replacing the
steam with some other f
luid or gas?

14

Carnots Answer

Efficiency of an
ideal engine
depends only on the
temperature
difference between
the reservoirs
15

Carnots Answer
Hukum kedua termodinamika mengatakan b
ahwa aliran kalor memiliki arah
Dengan kata lain, tidak semua proses di ala
m semesta adalah reversible (dapat dibalikka
n arahnya)
Sebagai contoh jika seekor beruang kutub te
rtidur di atas salju, maka salju dibawah tubu
h nya akan mencair karena kalor dari tubuh
beruang tersebut
Akan tetapi beruang tersebut tidak dapat menga
mbil kalor dari salju tersebut untuk menghangatk
an tubuhnya
16

Does Theory Matter?


Theory and Construction of
a Rational Heat-engine to
Replace the Steam Engine
and Combustion Engines
Known Today
(Rudolf Diesel, 1893)

17

Theory
Drives
Practice
Drives
Theory
18

Observations, Laws and Theo


ries

(Endres & Rombach,


2003)

Repeatable observations can often be stated as a law


Using this law, we can then make predictions about further obs
ervations
A law tells us how things occur, but not why. Theories explain w
19 observations
hy it is true and order our

Math Theorem vs. Science Theory

20

Math Theorem vs. Scientific Theory


Math Theorem

Scientific Theory

Starts with a simple, welldefine model


Deductive reasoning: Pro
ven using logical deducti
on
Useful it if provides deep
insights

Inductive reasoning: Pro


ven by lots of confirming
observations and no nonconforming observations

Starts with the complex, m


essy universe

Useful if it makes reliable


predictions and helps us u
nderstand the universe
Even wrong theories are u
seful
21

Exercise
Download dan pahami buku (Endre
s & Rombach, 2003) di http://romisatri
awahono.net/lecture/tc/reference/

Pilih satu hukum (Law) di bidang So


ftware Engineering, baca dan paha
mi hukum yang dipilih serta Theory
yang menjelaskan tentang hukum te
rsebut
22

Tugas
Tentukan dua hukum (LAW) dari no urut
No urut 1, ambil L1, L14 dan L27
No urut 2, ambil L2, L15 dan L28

Rangkumkan penjelasan yang tegas dan lugas


dengan bahasa manusia dari hukum yang dipil
ih, dalam bentuk 4 slide (pptx) dengan format:
1.
2.
3.
4.

LAW
APPLICATION
EVIDENCE
THEORY

Buat card di board Course Assignment di trell


o.com dan upload tugas ini di trello.com
23

Key Questions
1. Is the potential work available from
a heat source potentially
unbounded?"
2. Can heat engines be improved by
replacing the steam with some
Carnots
questions
about
heat
other fluid or gas?

engines

1. Can all problems be solved by


computers?"
2. Can computers solve more
problems by changing their
operation?

Analogous questions about


24
computers

Precise Definitions Needed


What is a problem?

What is a computer?

What does it mean for a computer to solve a


problem?
How do we measure time?

Two Key Questions


What problems can a computer
solve? (Computability) What problems can a
computer solve in a
reasonable time?
25
(Complexity)

What Problems can a Computer Sol


ve?

During the last six months I


have been contriving another
engine of far greater power ... I
am myself astonished at the
powers I have given it.
(Charles Babbage, 1835)

It will not slice a pineapple.


(Charles Babbage, 1852)

Answered (for a model) by Church and Turing (1930s)


26

Theres an app for that?


27

What Problems can Real Compute


rs Solve in a Reasonable Time?

I can't find an efficient algorithm,


but neither can all these famous
people
28

Theoretical
version: (P =
NP) posed by
Stephen Cook in
1971
Pragmatic
Open problem
version: do all
computers in our
universe have
these
limitations?
Open problem

1.2 What is Theory of Computa


tion?

29

What is Theory of Computati


on?
The branch of computer science and ma
thematics that deals with how efficiently
problems can be solved on a model of co
mputation, using an algorithm
The field is divided into three major bran
ches: automata theory and language, co
mputability theory, and computational c
omplexity theory, which are linked by the
question: "What are the fundamental cap
abilities and limitations of computers?."

What is Theory of Computation?


This course focuses on three traditionally
central areas of the theory of computatio
n:
1. Automata
2. Computability
3. Complexity

They are linked by the question:


What are the fundamental capabilities and limit
ations of computers?
31

What is Theory of Computati


on?
What can or cannot be computed efficie
ntly with given resources?
1. Can it be computed? Computability Theo
ry
2. Can it be computed quickly? Complexity
Theory

What is Theory of Computati


on?
Computability
Theory

Complexity Theory

Problems are Solvable

Computationally Hard
Problems

Problems are Not Solvable

Computationally Easy
Problems

33

1. Automata Theory
Automata theory deals with the definiti
ons and properties of mathematical mo
dels of computation
These models play a role in several app
lied areas of computer science:
Finite automaton: used in text processing,
compilers, and hardware design
Context-free grammar: used in programmi
ng languages and artificial intelligence
34

Models of Computation
Machine-like

Language-like

Finite Automata

Regular Expressions

Context-free
Pushdown Automata
Grammar
Unrestricted
Grammar, Lambda
Calculus

Turing machine

35

2. Computability Theory
Mathematicians discovered that certain basic
problems cannot be solved by computers
Example: the problem of determining whether a m
athematical statement is true or false

The theories of computability and complexity


are closely related
1. Complexity theory: the objective is to classify pr
oblems as easy ones and hard ones
2. Computability theory: the classification of proble
ms is by those that are solvable and unsolvable

Computability theory introduces several of th


e concepts used in complexity theory
36

3. Complexity Theory
What makes some problems computationally hard and
others easy?
You have several options when you confront a problem
that appears to be computationally hard:
1. By understanding which aspect of the problem is at the root
of the difficulty, so that the problem is more easily solvable
2. Be able to settle for less than a perfect solution to the probl
em. In certain cases, finding solutions that only approximate
the perfect one is relatively easy
3. Some problems are hard only in the worst case situation, bu
t easy most of the time
4. You may consider alternative types of computation, such as
randomized computation, that can speed up certain tasks

One applied area that has been affected directly by co


mplexity theory is the ancient field of cryptography
37

Referensi
1. Michael Sipser, Introduction to the Theory of Com
putation Third Edition, Cengage Learning, 2012
2. George Tourlakis, Theory of Computation, Wiley, 2
012
3. John Martin, Introduction to Languages and the Th
eory of Computation, McGraw-Hill , 2010
4. Robert Sedgewick and Kevin Wayne, Introduction t
o Computer Science, Addison-Wesley, 2015 (http:
//introcs.cs.princeton.edu/java)
5. Albert Endres dan Dieter Rombach, A Handbook of
Software and Systems Engineering, Pearson Educa
tion Limited, 2003
38

You might also like