104
CDT314 CDT314 FABER Formal Languages, Automata and Models of Computation and Models of Computation L t 1 It Lecture 1 - Intro School of Innovation, Design and Engineering Mälardalen University Mälardalen University 2013 1

Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Embed Size (px)

Citation preview

Page 1: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

CDT314CDT314

FABER

Formal Languages, Automata and Models of Computationand Models of Computation

L t 1 I tLecture 1 - Intro

School of Innovation, Design and Engineering Mälardalen UniversityMälardalen University

2013

1

Page 2: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Content

AdminstriviaMathematical PreliminariesMathematical PreliminariesCountable Sets (Uppräkneliga mängder)Uncountable sets (Överuppräkneliga mängder)

2

Page 3: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Lecturer & Examiner

Gordana Dodig-Crnkovic

Course Assistant

Stefan BygdeStefan Bygde

3

Page 4: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Course Home PageCourse Home Page

http://www.idt.mdh.se/kurser/cd5560/

i it h l l !visit home page regularly!

4

Page 5: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Software Tool for Automata and Languages

JFLAP (http://www.jflap.org/)

JFLAP is software for experimenting with formal languages topics including o a a guages top cs c ud gnondeterministic finite automata, nondeterministic pushdown automata, multi-tape Turing machines, several types of grammars, parsing, and L-systems. Also JFLAP allows one toAlso, JFLAP allows one to experiment with construction proofs from one form to another, such as converting an NFA to a DFA to a minimal state DFA to a regular expression or regular grammar

5

Page 6: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Video Resources 1

Lennart Salling, Uppsala Universityhttp://www math uu se/ salling/AUTOMATA DV/index htmlhttp://www.math.uu.se/~salling/AUTOMATA_DV/index.htmlIntroduction – automata theoryhttp://www.youtube.com/watch?feature=player_embedded&v=LDRNUWrRRzw

Program, strings, integers and integer functions http://www.youtube.com/watch?v=5ncgZ73yQko

htt // t b / t h?f t l b dd d& 5 Z73 Qk I thhttp://www.youtube.com/watch?feature=player_embedded&v=5ncgZ73yQko Is there any function that cannot be computed by an algorithm/a program?

http://www.youtube.com/embed/acsUNSkzUgg?hl=en&fs=1 Infinities

6

Page 7: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Video Resources 2

Lennart Salling, Uppsala Universityhttp://www.youtube.com/user/swedishSalt/videos

www.youtube.com/watch?v=MzDG34w0LLA&feature=player_embedded SubsetConstruction

http://www.youtube.com/watch?v=RYNN-tb9WxI&feature=related Regular Expression to NFA

http://www.youtube.com/watch?v=shN_kHBFOUE&feature=related Regular Expression to FA

http://www.youtube.com/watch?v=dlH2pIndNrU&feature=related Regular Expression to DFA

http://www youtube com/embed/2abHjjS8Tqc?hl=sv&fs=1 Halting problemhttp://www.youtube.com/embed/2abHjjS8Tqc?hl=sv&fs=1 Halting problem

http://www.youtube.com/embed/y-zMnV3G9pg?hl=sv&fs=1 Rice’s problem

http://www.youtube.com/watch?v=WMN_wz-b3K0&feature=related Accept and decide (TM)

http://www.youtube.com/embed/WMN_wz-b3K0?hl=sv&fs=1 Accept and decide

7

Page 8: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Videos on Computing in General

htt // t b / t h? 5 O3NYJl0 G t P i i l f C ti P t Jhttp://www.youtube.com/watch?v=5a_pO3NYJl0 Great Principles of Computing - Peter J. Denning

http://www.youtube.com/watch?v=60P7717-XOQ&feature=related Stephen Wolfram: Computing a theory of everything

http://www youtube com/watch?v=cCdbZqI1r7I&feature=related Computing Beyond Turinghttp://www.youtube.com/watch?v=cCdbZqI1r7I&feature=related Computing Beyond Turing -Jeff Hawkins

8

Page 9: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

How Much Work in This Course?

20 hours a week for this type of course20 hours a week for this type of course (norm)

4 hours lectures4 hours lectures2 hours exercises

14 hours own work a week!14 hours own work a week!

9

Page 10: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Course LiteratureBooks

Linz An Introduction to Formal Languages and Automata Jones &Linz, An Introduction to Formal Languages and Automata, Jones & Bartlett 2012 (used for lectures & exercises)

Alternative in SwedishAlternative in SwedishSalling: Formella språk, automater och beräkningar, 2001

Compendia

REGULAR LANGUAGESREGULAR LANGUAGESCONTEXT FREE LANGUAGESRECURSIVELY ENUMERABLE LANGUAGES

10

Page 11: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Why Theory of Computation?

1. A real computer can be modelled by a mathematical object: a theoretical computertheoretical computer.

2. A formal language is a set of strings, and can represent a computational problem.

3 A f l l b d ib d i diff3. A formal language can be described in many different ways that ultimately prove to be identical.

4. Simulation: the relative power of computing models can be b d th ith hi h d l i l tbased on the ease with which one model can simulate another.

11

Page 12: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Why Theory of Computation?

5 Robustness of a general computational model5. Robustness of a general computational model. 6. The Church-Turing thesis: "everything algorithmically

computable is computable by a Turing machine."7 Study of non determinism: languages can be described by the7. Study of non-determinism: languages can be described by the

existence or no-nexistence of computational paths. 8. Understanding unsolvability: for some computational problems

there is no corresponding algorithm that will unerringly solvethere is no corresponding algorithm that will unerringly solve them.

12

Page 13: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Practical Applications1. Efficient compilation of computer languages2. String search3. Investigation of the limits of computation,

recognizing difficult/unsolvable problems4. Applications to other areas:pp

– circuit verification– economics and game theory (finite automata as strategy

models in decision-making);models in decision making); – theoretical biology (L-systems as models of organism

growth) computer graphics (L systems)– computer graphics (L-systems)

– linguistics (modelling by grammars)

13

Page 14: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Algorithms and Automatizing of Mathematics

History•Euclid's attempt to axiomatize geometry

(Archimedes realized, during his own efforts to define the area of a planar figure, that Euclid's attempt had failed and that additional postulates were needed. )

•Leibniz's (1646 - 1716) dream reasoning as calculus - "Characteristica Universalis" aiming at:

" l th d i hi h ll t th f th ld b d d t"a general method in which all truths of the reason would be reduced to a kind of calculation. At the same time this would be a sort of universal language or script, but infinitely different from all those projected hitherto; for the symbols and even the words in it would direct reason; and errors, except those of fact, would ; , p ,be mere mistakes in calculation.“

•de Morgan, Boole, Frege, Russell, Whitehead: Mathematics as a branch

14

of symbolic logic

Page 15: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

1900 Hilberts program for axiomatization of mathematics, redefined " f" b l l i i ll diff"proof" to become a completely rigorous notion, totally different from the psycho/sociological "A proof is something that convinces other mathematicians.“ He confirms the prediction Leibniz made, that "the symbols would direct reason"that the symbols would direct reason

1880 -1936 first programming languages

1931 Gödels incompleteness theorems

1936 Turing machine (showed to be equivalent with recursive1936 Turing machine (showed to be equivalent with recursive functions). TM as ultimate model of computation

1950 Finite automata1950 Finite automata

1956 Language/automata hierarchy

15

Page 16: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Formalization of Mathematics

Every mathematical truth expressed in a formal y planguage is consisting of

• a fixed alphabet of admissible symbols, and

• explicit rules of syntax for combining those symbolsexplicit rules of syntax for combining those symbols into meaningful words and sentences

Gödel's two incompleteness theorems of mathematical logic show limitations of allGödel s two incompleteness theorems of mathematical logic show limitations of all but the most trivial axiomatic systems. The theorems are widely interpreted as showing that Hilbert's program to find a complete and consistent set of axioms for all of mathematics is impossible, thus giving a negative answer to Hilbert's second problem

16

problem.

Page 17: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Hilbert’s program

The main goal of Hilbert's program was to provide secure foundations for all mathematics In particular this should include:foundations for all mathematics. In particular this should include:A formalization of all mathematics; in other words all mathematical statements should be written in a precise formal language and manipulated according to well defined ruleslanguage, and manipulated according to well defined rules. Completeness: a proof that all true mathematical statements can be proved in the formalism. Consistency: a proof that no contradiction can be obtained inConsistency: a proof that no contradiction can be obtained in the formalism of mathematics. This consistency proof should preferably use only "finitistic" reasoning about finite mathematical objectsmathematical objects. Decidability: there should be an algorithm for deciding the truth or falsity of any mathematical statement.

17

Page 18: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Hilbert’s program

Gödel showed that most of the goals of Hilbert's program were impossible to achieve. His second incompleteness theorem stated that any consistent theory powerful enough to encode y y p gaddition and multiplication of integers cannot prove its own consistency. This wipes out most of Hilbert's program as follows:

It is not possible to formalize all of mathematics as any attempt atIt is not possible to formalize all of mathematics, as any attempt at such a formalism will omit some true mathematical statements.

The most interesting mathematical theories are not complete. A theory such as Peano arithmetic cannot prove its own

consistency.

18

Page 19: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Turing’s Contribution

Turing used a Universal Turing machine (UTM) to prove an incompleteness theorem even more powerful p p pthan Gödel’s because it destroyed not one but two of Hilbert's dreams:

1 Finding a finite list of axioms from which all1. Finding a finite list of axioms from which all mathematical truths can be deduced

2 S l i th t h id bl ("d i i2. Solving the entscheidungsproblem, ("decision problem“) by producing a "fully automatic procedure" f d idi h th i iti ( t ) ifor deciding whether a given proposition (sentence) is true or false.

19

Page 20: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Mathematical Preliminaries

Based on C Busch, RPI, Models of Computation

20

Page 21: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

• Sets

• Functions• Functions

• Relations

• Proof Techniques

• Set Cardinality and Infinities• Set Cardinality and Infinities

• Uncomputability

21

Page 22: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

SETS

A set is a collection of elements

}3,2,1{=A

},,,{ airplanebicyclebustrainB =

We write

A∈1 A∈1

Bship∉22

p

Page 23: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Set Representations

C = { a, b, c, d, e, f, g, h, i, j, k }

C = { a, b, …, k } finite set

S = { 2 4 6 } i fi it tS = { 2, 4, 6, … }

S = { j : j > 0 and j = 2k for some k>0 }

infinite set

S = { j : j > 0, and j = 2k for some k>0 }

S = { j : j is nonnegative and even }23

S = { j : j is nonnegative and even }

Page 24: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

A = { 1, 2, 3, 4, 5 }A { 1, 2, 3, 4, 5 }

U

A681 2 3

4 578

59

10

Universal Set: All possible elements

24

U = { 1 , … , 10 }

Page 25: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Set OperationspA = { 1, 2, 3 } B = { 2, 3, 4, 5}

A B• Union

A U B = { 1, 2, 3, 4, 5 }

A B

{ }

• Intersection

A B { 2 3 }

U

A B = { 2, 3 }

• Difference

U

A - B = { 1 }

B A { 4 5 } A-B

25

B - A = { 4, 5 } A B

Page 26: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

• ComplementComplement

Universal set = {1, …, 7}

A = { 1, 2, 3 } A = { 4, 5, 6, 7}

46

A A1

23

5

6A

5 7

A A26

A = A

Page 27: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

{ even integers } = { odd integers }

Integers

6

15even

odd

024

6

3

5

73 7

27

Page 28: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

DeMorgan’s Laws

A U B = A BU

A B = A U B

U

28

Page 29: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Empty Null Set:Empty, Null Set:

= { }

S U = S= Universal Set

S =

S = S

U

S - = S

- S =29

S

Page 30: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

SubsetSubset

A = { 1, 2, 3} B = { 1, 2, 3, 4, 5 }A B

U

Proper Subset: A B

UB

A

30

Page 31: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Disjoint Sets

A = { 1, 2, 3 } B = { 5, 6}{ } { }

A B = U

AA B

31

Page 32: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Set Cardinality

For finite sets

A { 2 5 7 }A = { 2, 5, 7 }

|A| = 3

32

Page 33: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

PowersetsPowersets

A powerset is a set of sets

S = { a, b, c }

Powerset of S = the set of all the subsets of S

2S = { , {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} }{ , {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} }

Ob ti | 2S | 2|S| ( 8 23 )33

Observation: | 2S | = 2|S| ( 8 = 23 )

Page 34: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cartesian Product

A = { 2, 4 } B = { 2, 3, 5 }

A X B = { (2, 2), (2, 3), (2, 5), ( 4, 2), (4, 3), (4, 5) }

|A X B| |A| |B||A X B| = |A| |B|

Generalizes to more than two sets

34A X B X … X Z

Page 35: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

PROOF TECHNIQUESPROOF TECHNIQUES

• Proof by construction

P f b i d ti• Proof by induction

• Proof by contradiction• Proof by contradiction

35

Page 36: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by Construction, An ExampleProof by Construction, An Example

We define a graph to be k-regular

if every node in the graph has degree k.

Theorem For each even number n > 2 there existsTheorem. For each even number n > 2 there exists

3-regular graph with n nodes. 23

1

3

1 2

40

50

363

n = 4 n = 6

Page 37: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by Construction

Construct a graph G = (V, E) with n > 2 nodes.

V= { 0 1 n 1 }V= { 0, 1, …, n-1 }

E = { {i i+1} | for 0 ≤ i ≤ n-2} ∪ {{n-1 0}} (*)E { {i, i+1} | for 0 ≤ i ≤ n 2} ∪ {{n 1,0}} ( )

∪ {{i, i+n/2 } | for 0 ≤ i ≤ n/2 –1} (**)

The nodes of this graph can be written consecutively around the circle.

(*) edges between adjacent pairs of nodes

(**) edges between nodes on opposite sides37

( ) edges between nodes on opposite sidesEND OF PROOF

Page 38: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Inductive ProofInductive Proof

W h t t t P P PWe have statements P1, P2, P3, …

If we knowIf we know

• for some k that P1, P2, …, Pk are true

• for any n ≥ k that

P1, P2, …, Pn imply Pn+1P1, P2, …, Pn imply Pn+1

Then

38Every Pi is true

Page 39: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by InductionProof by Induction

• Inductive basis• Inductive basis

Find P1, P2, …, Pk which are true

• Inductive hypothesis

Let’s assume P1 P2 P are trueLet s assume P1, P2, …, Pn are true,

for any n ≥ k

• Inductive step

Show that Pn+1 is true39

Show that Pn+1 is true

Page 40: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by Construction, An Example

Theorem A binary tree of height n

has at most 2n leaves.

Proof

let L(i) be the number of leaves at level i

L(0) = 1

L(3) 840

L(3) = 8

Page 41: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

We want to show: L(i) ≤ 2iWe want to show: L(i) ≤ 2

• Inductive basis

L(0) = 1 (the root node)( ) ( )

• Inductive hypothesis

Let’s assume L(i) ≤ 2i for all i = 0, 1, …, n

• Induction stepp

we need to show that L(n + 1) ≤ 2n+1

41

Page 42: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Induction Step

L lhypothesis: L(n) ≤ 2n

Leveln

n+1

42

Page 43: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Induction Step

hypothesis: L(n) ≤ 2n

Leveln hypothesis: L(n) ≤ 2nn

n+1n+1

L(n+1) ≤ 2 * L(n) ≤ 2 * 2n = 2n+1

43END OF PROOF

Page 44: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by induction, An Example:

Cardinality of a power setCardinality of a power setLet S be a finite set with N elements. Then the power set of S (that is the set of all subsets of S ) contains 2^NS (that is the set of all subsets of S ) contains 2 N elements. In other words, S has 2^N subsets. This statement can be proved by induction. We can see that it is t f N 0 1 2 3 b i titrue for N=0,1,2,3 by examination.

44The notation 2^N means 2 to the power N, i.e., the product of N factors all of which equal 2. 2^0 is defined to be 1.

Page 45: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cardinality of a power set

Let S be a set with N elements. For the induction step suppose that the statement is true for a set with N-1suppose that the statement is true for a set with N-1elements. Remove element x from S to obtain a set T with N-1 elements. There are two types of subsets of S: those th t t i d th th t d t t i Th l ttthat contain x and those that do not contain x. The latter are subsets of T, of which there are 2^ N-1.

Every subset P of S that does contain x can be obtained from a subset Q of T by adding x. The set Q is simply the set P with x removed There is a unique and distinct set Qset P with x removed. There is a unique and distinct set Qfor each set P, and every subset Q of T gives rise to a unique and distinct subset P of S. There are 2^ (N-1)

b t f S th t t i f t t l f 2^ (N 1) 2^ (N 1)45

subsets of S that contain x, for a total of 2^ (N-1) + 2^ (N-1)= 2^ N subsets of S.

Page 46: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by Induction Cardinality of Power Set An Example:Proof by Induction. Cardinality of Power Set An Example:

Induktionsbevis: Potensmängdens kardinalitet

Påstående: En mängd med n elementPåstående: En mängd med n element har 2n delmängder

The claim: A set with n elements has 2n subsets

Kontroll/Check

• Tomma mängden {} (med noll element) har bara en delmängd: {}.

• Empty set {} (zero elements) has only one subset: {}. 20=1

• Mängden {a} (med ett element) har två delmängder: {} och {a}

• Set {a} (with one element) has two subsets: {} and {a} 21=2

46

Page 47: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Påstående: En mängd med n element har 2n delmängder

Proposition: A set with n elements has 2n subsets

Kontroll/CheckKontroll/Check• Mängden {a, b} (med två element) har fyra delmängder:

{}, {a}, {b} och {a,b}

• Set {a, b} (with two elements) has four subsets: {}, {a}, {b} och {a,b} 22=4

• Mängden {a b c} (med tre element) har åtta delmängder:Mängden {a, b, c} (med tre element) har åtta delmängder: {}, {a}, {b}, {c} och {a,b}, {a,c}, {b,c}, {a,b,c}

S t { b } ( ith th l t ) h i ht b t• Set {a, b, c} (with three elements) has eight subsets: {}, {a}, {b}, {c} och {a,b}, {a,c}, {b,c}, {a,b,c} 23=8

Påstående stämmer så här långt.

47The proposition is correct this far.

Page 48: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

BasstegBassteg

Enklaste fallet är en mängd med noll element (det finns å 0bara en sådan), som har 20 = 1 delmängder.

Base caseBase case

The simplest case is the set with 0 elements (there is just one such set), that has 20 = 1 subsets.

48

Page 49: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

InduktionsstegInduktionsstegAntag att påståendet gäller för alla mängder med k

element, dvs antag att varje mängd med k element har 2k delmängder.

Visa att påståendet i så fall också gäller för alla mängder d k 1 l t d i tt j ä d d k 1med k+1 element, dvs visa att varje mängd med k+1

element har 2k+1 delmängder.

Induktion stepAssume that the claim is valid for all sets with k

elements i e that every set with k elements has 2kelements, i.e. that every set with k elements has 2subsets.

Show that this implies that the proposition is true for every

49

Show that this implies that the proposition is true for every set with k+1 element, that is show that each set with k+1 elements has 2k+1 subsets.

Page 50: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Ta en godtycklig mängd med k+1 element. Delmängderna till mängden kan delas upp i två sorter:1. Delmängder som inte innehåller element nr k+1: En sådan delmängd är en delmängd till mängden med de k första g g gelementen, och delmängder till en mängd med k element finns det (enligt antagandet) 2k stycken.

Let us take an arbitrary set with k+1 elements Subsets of that setLet us take an arbitrary set with k+1 elements. Subsets of that set can be of two kinds:1. Subsets that do not contain the element nr k+1: that is a subset of a set with k first elements and there are 2k subsets of a set withof a set with k first elements, and there are 2k subsets of a set with k element (according to the inductive hypothesis).

12

3

k-1

k k+1….

50

4

Page 51: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

2. Delmängder som innehåller element nr k+1: En sådan delmängd kan man skapa genom att ta en delmängd som inte innehåller element nr k+1 och lägga till detta element. Eftersom det finns 2k delmängder utan element nr k+1 kan man även skapa 2k delmängder med detta element.

T t lt h 2k 2k 2 2k 2k+1 d l ä d till d b t kt dTotalt har man 2k + 2k = 2. 2k= 2k+1 delmängder till den betraktade mängden.

2 Subsets that contain the element nr k+1: Such a subset can be2. Subsets that contain the element nr k+1: Such a subset can be created by adding the element nr k+1 to those subsets that do not contain it. As there are 2k subsets without the element nr k+1 there will be 2k subsets with that elementbe 2k subsets with that element.

In total, there are 2k + 2k = 2 . 2k = 2k+1 subsets.

51END OF PROOF

Page 52: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

P f b C t di tiProof by Contradiction

We want to prove that a statement P is true

• we assume that P is false

• then we arrive at a conclusionthen we arrive at a conclusion that contradicts our assumptions

• therefore statement P must be true• therefore, statement P must be true

52

Page 53: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Proof by Contradiction, An Example

Theorem is not rational22

ProofAssume by contradiction that it is rational

= n/m

n and m have no common factors

2

We will show that this is impossible

53

Page 54: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

= n/m 2 m2 = n22

Th f 2 in is even

Therefore, n2 is evenn = 2 k

2 m2 = 4k2 m2 = 2k2m is even

m = 2 pThus, m and n have common factor 2

Contradiction!

54END OF PROOF

Page 55: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Countable SetsCountable Sets

55

Page 56: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Infinite sets are eitherCountable or Uncountable

56

Page 57: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Countable set

There is a one to one correspondencebetween elements of the set and natural numbers

57

Page 58: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

We started with the natural numbers, thenf• add infinitely many negative whole numbers to get the

integers, • then add infinitely many rational fractions to get thethen add infinitely many rational fractions to get the rationals

Each infinite addition seem to increase di lit |N| < |Z| < |Q|cardinality: |N| < |Z| < |Q|

B t i thi t ? NO!But is this true? NO!

58

Page 59: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Example The set of integers is countable

Integers: K,2,2,1,1,0 −−

g

g

Correspondence:Correspondence:

Natural numbers: K,4,3,2,1,0

oddnnevennnnf 2/)1(;2/)( { +−=59

oddnnevennnnf 2/)1(;2/)( { +

Page 60: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Example The set of rational numbersa p eis countable

Positive Rational numbers:

K,87,

43,

21

Rational numbers: 842

60

Page 61: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Naive Idea111

Rational numbers: K,3

,2

,1

Correspondence:

Natural numbers: K,3,2,1

Doesn’t work!

we will never count 22261

numbers with nominator 2:K,

3,

2,

1

Page 62: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Better Approach

1 1 1 1 ...1 2 3 4

2 2 212

22

32 ...

13

23 ...

1 24

Rows: constant numerator (täljare)

Columns: constant denominator

621...

Page 63: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

1 1 1 111

21

31

41 ...

2 2 2 ...1 2 3

13

23 ...

1 2

4631

4 ...

Page 64: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

We proved:

the set of rational numbers is countableb d ibi ti dby describing an enumeration procedure

64

Page 65: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Definitions

A language is a set of stringsA language is a set of strings.

A string is a sequence of symbolsdefined over an alphabet:

A string is a sequence of symbols

{ }zcba ,,,, K=Σ

An alphabet is a set of symbols.

65

Page 66: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Definition

Let S be a set.

A i d f i

Let S be a set.

An enumeration procedure for S is analgorithm that generatesall elements of S one by one.

66

Page 67: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

A set is countable if there is an

Observation

A set is countable if there is anenumeration procedure for it.

67

Page 68: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Example

The set of all finite strings of symbolsis countable.+},,{ cba is countable. },,{ cba

W ill d ib th ti dProofWe will describe the enumeration procedure.(Constructive proof)

68

Page 69: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Naive procedure:Naive procedure:

Produce the strings in lexicographic order:

aaaaaa

......aaaa......

Doesn’t work!Strings starting ith ill ne er be prod cedb

69

Strings starting with will never be produced. b

Page 70: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Better procedure: Proper Order

1. Produce all strings of length 1g g2. Produce all strings of length 23 Produce all strings of length 33. Produce all strings of length 34. Produce all strings of length 4..........

70

Page 71: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

length 1abcaaab

Produce strings in

abacba

Proper Order bbbc

length 2

cacbccccaaaaab length 3

71

aabaac......

length 3

Page 72: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Theorem

The set of all finite strings is countable.

Proof Any finite string can be encodedwith a binary string of 0’s and 1’s.

Find an enumeration procedure f th t f fi it t ifor the set of finite strings.

72

Page 73: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Produce strings in Proper Order

0 0String = program Natural number

length 101

01

length 2

0001

234length 2 10

11

45

length 3000001….

67….

73

….

Page 74: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

PROGRAM = STRING (syntactic way)

PROGRAM = FUNCTION Ν→Ν (semantic way)

PROGRAMstring string

natural naturalPROGRAM

natural number

n∈Ν

natural number

n∈Ν

74

Page 75: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Uncountable SetsUncountable Sets

75

Page 76: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Definition

A set is uncountable if it is not countable.

76

Page 77: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Theorem

The set of all infinite strings is uncountable.

Proof�

We assume we have

Proof�(by contradiction)

an enumeration procedure for the set of infinite strings.for the set of infinite strings.

77

Page 78: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cantor’s diagonal argument

Infinite string EncodingInfinite string

0w ...00b 01b 02b=

1w ...10b 11b 12b=1w

w

...10b

b11b

b12b

b2w ...20b 21b 22b=

78... ... ... ... ...

Page 79: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cantor’s diagonal argument

We can construct a new string wthat is missing in our enumeration!

Conclusion

The set of all infinite strings is uncountable!u cou ab e

79

Page 80: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

An infinite string can be seen as FUNCTION Ν→Ν (n:th output is n:th bit in the string)output is n:th bit in the string)

Conclusion

There are some integer functions thatthat cannot be described by finite stringsthat cannot be described by finite strings (programs/algorithms).

80

Page 81: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Example of uncountable infinite sets

Th

Example of uncountable infinite sets

Theorem

Let be an infinite countable setSLet be an infinite countable set.

Th f i blS2 S

S

The powerset of is uncountable.S2 S

81

Page 82: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

P fProof

Since is countable we can writeSSince is countable, we can write S

},,,{ 321 KsssS = },,,{ 321

82

Page 83: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Elements of the powerset have the form:Elements of the powerset have the form:

},{ 31 ss

},,,{ 10975 ssss

……

83

Page 84: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

We encode each element of the power setwith a binary string of 0’s and 1’swith a binary string of 0 s and 1 s

Encoding

1s 2s 3s 4sPowersetelement

g

...

1 0 0 0}{ 1s ...

0 1 1 0},{ 32 ss ...

1 0 1 1},,{ 431 sss ...84

1 0 1 1},,{ 431 sss ...

Page 85: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Let’s assume (by contradiction) that the powerset is countable.

we can enumerateThen:we can enumerate the elements of the powerset

85

Page 86: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Powerset Encoding

1 0 0 0 0element Encoding

p ...1 0 0 0 0

0 0 0

1p ...

1 1 0 0 02p ...

1 1 0 1 03p ...

1 1 0 0 14p ...

86...

Page 87: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Take the powerset elementwhose bits are the complements pin the diagonal

87

Page 88: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

1 0 0 0 0 ...1p

1 1 0 0 0

1p

p 1 1 0 0 0 ...2p

1 1 0 1 0 ...3p

1 1 0 0 1 ...4p

New element: K001188(binary complement of diagonal)

Page 89: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

The new element must be some ipThe new element must be someof the powerset

ip

However, that’s impossible:

f d fi iti f p

th i th bit f t b

from definition of ip

pthe i-th bit of must be the complement of itself

ip

Contradiction!89

Page 90: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Si h t di tiSince we have a contradiction:

The powerset of is uncountable S2 S

90END OF PROOF

Page 91: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

E l Al h b t }{ baAn Application: Languages

Example Alphabet : },{ baThe set of all finite strings:The set of all finite strings:

},,,,,,,,,{},{ * KaabaaabbbaabaababaS λ==

infinite and countable

}}}{{}{}{{2 aababaabaaS λ=

The powerset of contains all languages:S}},,,}{,{},{},{{2 Kaababaabaaλ

1L 2L 3L 4L L

91uncountable infinite

Page 92: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Finite strings (algorithms): countableLanguages (power set of strings): uncountableLanguages (power set of strings): uncountable

There are infinitely many more languagesth fi it t ithan finite strings.

92

Page 93: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Conclusion

There are some languagesThere are some languages that cannot be described by finite strings (algorithms)(algorithms).

93

Page 94: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Number Sets

http://thinkzone.wlonk.com/Numbers/NumberSets.htm

94Alan Turing 'On computable numbers, with an application to the Entscheidungsproblem' from Proceedings of the London Mathematical Society, (Ser. 2, Vol. 42, 1937)

Page 95: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Number Sets

95http://www.tutornext.com/math/number-system.html

Page 96: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Number Sets

96http://mathequality.wordpress.com/2011/08/02/creating-a-number-set-venn-diagram-poster/

Page 97: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cardinality - KardinaltalCardinality - Kardinaltal

Cardinality is a measure of the size of a set.Kardinaltal är mått på storleken av mängder.

Cardinality of a finite set is simply its number ofCardinality of a finite set is simply its number of elements. Kardinaltalet för en ändlig mängd är helt enkelt antalet element i mängden. g

Two sets have the same cardinality if there exist bijection between them.Två mängder är lika mäktiga om man kan para ihop elementen i den enaTvå mängder är lika mäktiga om man kan para ihop elementen i den ena mängden med elementen i den andra på ett uttömmande sätt, dvs det finns en bijektion mellan dem.

97

Page 98: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cardinality - Kardinaltaly

C di lit b li d t i fi it t E S tCardinality can be generalized to infinite sets. E.g. Sets of positive integers and set of integers have the same cardinality.Kardinaltal kan generaliseras till oändliga mängder. Till exempel är mängden av positiva heltal och mängden av heltal lika mäktiga (har samma kardinaltal).

However, real numbers cannot be mapped to integers in that way. Cardinality of reals is bigger than cardinality of integerscardinality of integers.Däremot kan man inte para ihop alla reella tal med heltalen på detta sätt. Mängden av reella tal har större mäktighet än mängden av heltal.

98

Page 99: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Cardinality - KardinaltalCardinality Kardinaltal

Man kan införa kardinaltal på ett sådant sätt att två mängder har samma kardinaltal om och endast om de har samma mäktighet. T ex kallas kardinaltalet som hör till de hela talen för ℵ0 (alef 0, alef är den första bokstaven i det hebreiska alfabetet).

Dessa oändliga kardinaltal kallas transfinita kardinaltal.

99

Page 100: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Mer om oändligheter…More about Infinty

Georg Cantor utvecklade i slutet av 1800-talet matematikens logiska

More about Infinty

Georg Cantor utvecklade i slutet av 1800 talet matematikens logiska grund, mängdläran.

Den enklaste, "minsta", oändligheten kallade han ℵ0. , , g 0

Det är den uppräkningsbara oändliga mängdens (exempelvis mängden av alla heltal) kardinaltalet.

Kardinaltalet av mängden punkter på en linje, och även punkterna på ett plan och i en kropp, kallade Cantor ℵ1.

Fanns det större oändligheter?

100

Page 101: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Ja! Cantor kunde visa att antalet funktioner på en li j ”ä ä dli ” ä kt å li jlinje var ”ännu oändligare” än punkterna på linjen, och han kallade den mängden ℵ2.

Cantor fann att det gick att räkna med kardinaltalen precis som med vanliga tal, men räknereglerna blev något enahanda..

ℵ + 1 ℵ ℵ +ℵ ℵ ℵ ℵ ℵℵ0 + 1= ℵ0 ℵ0 +ℵ0 = ℵ0 ℵ0 · ℵ0 = ℵ0.

101

Page 102: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Men vid exponering hände det något:

ℵ0ℵ0 (ℵ0 upphöjt till ℵ0) = ℵ1ℵ0 (ℵ0 upphöjt till ℵ0) ℵ1.

M llt i d d t i ttMer generellt visade det sig att

2 ℵn (2 upphöjt till ℵn) = ℵn+1

Det innebar att det fanns oändligt många oändligheter, den ena mäktigare än den andra!

102

Page 103: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

M d t kli äk t tt d t i t f åMen var det verkligen säkert att det inte fanns någon oändlighet mellan den uppräkningsbara och punkterna på linjen? Cantor försökte bevisa den så kallade k ti h tkontinuumhypotesen.

Cantor: two different infinities ℵ0 and ℵ1Ca o o d e e es ℵ0 a d ℵ1http://www.ii.com/math/ch/#cardinalsContinuum Hypothesis: ℵ0 < ℵ1 = 2 ℵ0

Se även:http://www nyteknik se/pub/ipsart asp?art id=26484http://www.nyteknik.se/pub/ipsart.asp?art_id 26484

103

Page 104: Formal Languages, Automata and Models of Computationand ... · Formal Languages, Automata and Models of Computationand Models of Computation Lt 1Lecture 1 - ItIntro School of Innovation,

Course materials based onCourse materials based on

1. Peter Linz, An Introduction to Formal Languages and Automata

2. http://www.cs.rpi.edu/courses/fall00/modcomp3/Models of Computation C BuschModels of Computation, C Busch

3. Lenart Salling, Formella språk, automater och beräkningar

4. http://www.cs.duke.edu/~rodger Mathematical Foundations of Computer Science; Susan H Rodger; Duke UniversitySusan H. Rodger; Duke University

5. Rich Elaine, Automata, Computability and Complexity: Theory and Applications, Prentice Hall

104