Docsity

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

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.