Introduction to Computer Science

Similar documents
THE HALTING PROBLEM. Joshua Eckroth Chautauqua Nov

Computability, Cantor s diagonalization, Russell s Paradox, Gödel s s Incompleteness, Turing Halting Problem.

In order to solve the puzzle, you try to form the string MU starting with the string MI and using the following rules for forming new strings from old

Computation Club: Gödel s theorem

Introduction to the Lambda Calculus. Chris Lomont

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

CS61A Lecture 38. Robert Huang UC Berkeley April 17, 2013

What if current foundations of mathematics are inconsistent? Vladimir Voevodsky September 25, 2010

Discrete Mathematics Lecture 4. Harper Langston New York University

The Eval/Apply Cycle Eval. Evaluation and universal machines. Examining the role of Eval. Eval from perspective of language designer

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

Kurt Gödel and Computability Theory

Inference rule for Induction

Notes on Turing s Theorem and Computability

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

1 Elementary number theory

Material from Recitation 1

Course notes for Data Compression - 2 Kolmogorov complexity Fall 2005

Epimenides, Gödel, Turing: an Eternal Gölden Tangle [0]

Induction and Recursion. CMPS/MATH 2170: Discrete Mathematics

Revisiting Kalmar completeness metaproof

Chapter 12. Computability Mechanizing Reasoning

The Undecidable and the Unprovable

AXIOMS FOR THE INTEGERS

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Chapter Summary. Mathematical Induction Recursive Definitions Structural Induction Recursive Algorithms

Lambda Calculus and Computation

λ-calculus Lecture 1 Venanzio Capretta MGS Nottingham

MAT 3271: Selected Solutions to the Assignment 6

3.1 Constructions with sets

Verifying Safety Property of Lustre Programs: Temporal Induction

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Math Introduction to Advanced Mathematics

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

In this section we will study problems for which we can prove that there is no algorithm solving them.

Java s Precedence. Extended Grammar for Boolean Expressions: Implication. Parse tree. Highest precedence. Lowest precedence

How to Prove Higher Order Theorems in First Order Logic

Software System Design and Implementation

Section 2.4: Arguments with Quantified Statements

Jaykov Foukzon. Israel Institute of Technology, Haifa, Israel.

The Diagonal Lemma: An Informal Exposition

Announcements. CSCI 334: Principles of Programming Languages. Exam Study Session: Monday, May pm TBL 202. Lecture 22: Domain Specific Languages

Menu. Lecture 25: Gödel and Computability. Computability. Proof General Idea. Gödel s Statement

The Further Mathematics Support Programme

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

INTLOGS17 Test 1. Prof: S Bringsjord TA: Rini Palamittam NY

Simple Lisp. Alonzo Church. John McCarthy. Turing. David Hilbert, Jules Richard, G. G. Berry, Georg Cantor, Bertrand Russell, Kurt Gödel, Alan

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

We ve studied the main models and concepts of the theory of computation:

CSE 215: Foundations of Computer Science Recitation Exercises Set #4 Stony Brook University. Name: ID#: Section #: Score: / 4

To illustrate what is intended the following are three write ups by students. Diagonalization

14 More Graphs: Euler Tours and Hamilton Cycles

A Relatively Small Turing Machine Whose Behavior Is Independent of Set Theory

(Refer Slide Time 3:31)

Primes in Classes of the Iterated Totient Function

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

1 Elementary number theory

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Lesson 19: The Graph of a Linear Equation in Two Variables is a Line

Elementary Recursive Function Theory

Lecture 5: The Halting Problem. Michael Beeson

Computability Mechanizing Reasoning

Summary of Course Coverage

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

2. CONNECTIVITY Connectivity

CS 531: Notes II. January 31, 2014

Software System Design and Implementation

An Annotated Language

Computability Mechanizing Reasoning

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Introduction to Axiomatic Semantics (1/2)

8 NP-complete problem Hard problems: demo

Recursively Defined Functions

Ramsey s Theorem on Graphs

Math 187 Sample Test II Questions

Number Theory and Proof Methods

A Relatively Small Turing Machine Whose Behavior Is Independent of Set Theory

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

introduction to Programming in C Department of Computer Science and Engineering Lecture No. #40 Recursion Linear Recursion

HW1. Due: September 13, 2018

MATH Iris Loeb.

CSE 120. Computer Science Principles

NUMBERS AND NUMBER RELATIONSHIPS

Programming Proofs and Proving Programs. Nick Benton Microsoft Research, Cambridge

Introduction to Axiomatic Semantics (1/2)

Critical Analysis of Computer Science Methodology: Theory

4&5 Binary Operations and Relations. The Integers. (part I)

Assignment # 1. Farrukh Jabeen COMP 581 Mathematical Methods in AI Due Date: September 7, 2009

2.1 The λ-calculus Syntax

We will show that the height of a RB tree on n vertices is approximately 2*log n. In class I presented a simple structural proof of this claim:

Mathematics for Computer Scientists 2 (G52MC2)

TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Transcription:

Introduction to Computer Science

A Quick Puzzle Well-Formed Formula any formula that is structurally correct may be meaningless Axiom A statement that is defined to be true Production Rule A rule that generates a true statement from another true statement Valid Statement A statement that is true

P-Q System The P-Q Language A statement in P-Q is WFF if and only if it is made up of the symbols -,p,q, and has 0 or more dashes, followed by p, followed by 0 or more dashes, followed by q, followed by 0 or more dashes --------p------q---- is WFF ---q----p--- is not WFF http://en.wikipedia.org/wiki/g%c3%b6del,_escher,_bach

P-Q Production Rules Production rule: if x p y q z is a valid statement, then so is x p y q z Example: if - - - - - p - - z - - - is a valid statement, then so is - - - - - p - - - z - - - - Can we derive an algorithm to decide if a given statement in P-Q is well formed? Can we derive an algorithm to decide if a given statement is is valid?

P-Q Meaning What if we let p be plus, and q be equal? Suppose we start with the statement pq Is it WFF? Is it valid? Suppose we apply the production rule once? pq => p-q- Suppose we start with pq? -pq = -p-q

P-Q is Addition P-Q is really isomorphic with addition There is a clear equivalence between a statement in p-q, and a statement involving integer addition. Can we prove that a given statement is valid? Sure start with the 0 statement Keep applying the production rule until you either find the string (true) or until you find strings that are longer (false) Can we list all statements in P-Q?

MIU Language The MIU Language A statement in MIU is WFF if an only if it contains the characters M,I,and U, and M is the first character Production Rules Given a string Mx => Mxx Given a string ends in I, replace it with U Given a III in a string, replace it with U Given UU in a string, remove them Examples: MUIUI => MUIUU => MUI => MUU => M MIIII => MUI => MUU => M Given the string MI, can we arrive at MU? http://en.wikipedia.org/wiki/g%c3%b6del,_escher,_bach

Wait, what? P-Q Had a nice decision procedure It was straight-forward to derive new facts, and we knew when to stop trying MIU Has NO nice decision procedure It also has a straight-forward way to derive new facts, but we didn t know when to stop Difference? What does this MEAN for us?

Gödel's first incompleteness theorem, states that: Any effectively generated theory capable of expressing elementary arithmetic cannot be both consistent and complete. In particular, for any consistent, effectively generated formal theory that proves certain basic arithmetic truths, there is an arithmetical statement that is true, but not provable in the theory. MIU is an example of this We cannot derive MU from MI http://en.wikipedia.org/wiki/g%c3%b6del%27s_incompleteness_theorems

But Godel was a Philosopher Entscheidungsproblem Proved by Church & Turing in 1936 The Entscheidungsproblem asks for an algorithm that will take as input a description of a formal language and a mathematical statement in the language and produce as output either "True" or "False" according to whether the statement is true or false. The algorithm need not justify its answer, nor provide a proof, so long as it is always correct. Such an algorithm would be able to decide, for example, whether statements such as Goldbach's conjecture or the Riemann hypothesis are true, even though no proof or disproof of these statements is known. Church & Turing (and us) demonstrated that it is not possible for any such system to exist for all such formal languages.

So what? We just proved that There are formal languages that we cannot write decision procedures to verify validity of a statement Computer programs are formal languages, and we cannot write a program to determine when a computer program is valid Even worse still, we cannot write a computer program to tell when we are running in a system like P-Q or like MIU we just have to wait for the answer possibly forever

Wait, WHAT? Computer Science Before the first computers we know that there are problems we can solve that there are problems we cannot solve that there are problems that if we can solve them at all are going to take a very very long time and that these things are true no matter how fast our systems get We now know that We can tell the difference between hard and easy problems We can often write approximations to the real systems And when we can t, we need to know this before we waste our time trying