Introduction to Discrete Mathematics: The Limits of Computation, Slides of Discrete Mathematics

The concept of computable functions and the halting problem in discrete mathematics. It discusses the impossibility of writing a program to determine if any given program halts or not, and the implications of this for the size of the set of computable functions compared to the set of all functions. The document also touches upon the notion of uncomputable functions and the undecidability of certain sets.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

emee
emee 🇮🇳

4.3

(30)

134 documents

1 / 67

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Discrete
Mathematics
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43

Partial preview of the text

Download Introduction to Discrete Mathematics: The Limits of Computation and more Slides Discrete Mathematics in PDF only on Docsity!

Introduction to Discrete

Mathematics

Turing’s Legacy:

The Limits Of Computation.

Anything

says is false!

The HELLO assignment

  • Write a JAVA program to output the word “HELLO” on the screen and halt.
  • Space and time are not an issue.
  • The program is for an ideal computer.
  • PASS for any working HELLO program, no partial credit.

Grading Script

  • The grading script G must be able to take any

Java program P and grade it.

  • Pass, if P prints only the word

G(P)= “HELLO” and halts.

  • Fail, otherwise.

How exactly might such a script work?

What kind of program

could a student who hated

his/her TA

hand in?

Note: This probably isn’t the best idea for how to do well on assignments.

Nasty Program

  • n:=0;
  • while (n is not a counter-example to the Riemann Hypothesis) {
  • n++;
  • }
  • print “Hello”;
  • The nasty program is a PASS if and only if the
  • Riemann Hypothesis is false.

The theory of what can

and can’t be computed by

an ideal computer is called

Computability Theory

or Recursion Theory.

Are all reals describable? Are all reals computable?

We saw that computable ⇒ describable, but do we also have describable ⇒ computable?

NO

NO

From the last lecture:

The “grading function” we just described is not computable! (We’ll see a proof soon.)

Computable Function

  • Fix any finite set of symbols, Σ. Fix any precise programming language, e.g., Java.
  • A program is any finite string of characters that is syntactically valid.
  • A function f : Σ→Σ^ is computable if there is a program P that when executed on an ideal computer, computes f. That is, for all strings x in Σ*^ , f(x) = P(x).

Hence: countably many computable functions!

There are only

countably many Java

programs.

Hence, there are only

countably many

computable functions.

Uncountably many functions

  • The functions f: Σ*^ → {0,1} are in
  • 1-1 onto correspondence with the
  • subsets of Σ^ (the powerset of Σ^ ).
  • Hence, the set of all f: Σ*^ → {0,1} has the
  • same size as the power set of Σ*.
  • And since Σ*^ is countably infinite, its
  • power set is uncountably infinite.

Countably many computable functions.

Uncountably many

functions from Σ*^ to {0,1}.

Thus, most functions from Σ*^ to {0,1} are not computable.

Notation And Conventions

Fix a single programming language (Java)

When we write program P we are talking about the text of the source code for P

P(x) means the output that arises from running program P on input x, assuming that P eventually halts.

P(x) = ⊥ means P did not halt on x

The meaning of P(P)

  • It follows from our conventions that P(P)

means the output obtained when we run P on

the text of its own source code.