Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance

Slides:



Advertisements
Similar presentations
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Advertisements

Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
EE1J2 – Discrete Maths Lecture 9
Introduction to Computability Theory
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
Great Theoretical Ideas in Computer Science.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
1 Lecture 10 Proving more specific problems are not recursive Reduction technique –Use subroutine theme to show that if one problem is unsolvable, so is.
CHAPTER 4 Decidability Contents Decidable Languages
1 Lecture 7 Topics –Problems about program behavior At least problem input is a program/algorithm –Halting Problem Fundamental problem about program behavior.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Great Theoretical Ideas in Computer Science.
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Ch. 11: Cantor’s Infinity!. N = {1, 2, 3, 4, 5, 6, …} “the natural numbers” Z = {…, –3, –2, –1, 0, 1, 2, 3, …} “the integers” Q = {all quotients “a/b”
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
Relations, Functions, and Countability
Donald Byrd rev. 28 November 2012
COMPSCI 102 Introduction to Discrete Mathematics.
INFIINITE SETS CSC 172 SPRING 2002 LECTURE 23. Cardinality and Counting The cardinality of a set is the number of elements in the set Two sets are equipotent.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
Great Theoretical Ideas in Computer Science.
Lecture 4 Infinite Cardinals. Some Philosophy: What is “2”? Definition 1: 2 = 1+1. This actually needs the definition of “1” and the definition of the.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
To Infinity And Beyond! CS Lecture 11 The Ideal Computer: no bound on amount of memory Whenever you run out of memory, the computer contacts the.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Undecidability and The Halting Problem
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
Decidability.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
1 Proof of the Day: The length of a string is the number of symbols it contains. For example, the length of is five. Let L = { w such that w is a.
Great Theoretical Ideas In Computer Science
The Acceptance Problem for TMs
Discrete Mathematics CS 2610
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
This statement is false.
CSE 311 Foundations of Computing I
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Discrete Structures for Computer Science
Andreas Klappenecker [based on slides by Prof. Welch]
CSCE 411 Design and Analysis of Algorithms
How Hard Can It Be?.
Discrete Math for CS CMPSC 360 LECTURE 44 Last time:
Decidable Languages Costas Busch - LSU.
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
Module #4.5, Topic #∞: Cardinality & Infinite Sets
CS21 Decidability and Tractability
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
CSCI 2670 Introduction to Theory of Computing
Decidability continued….
Instructor: Aaron Roth
Computability and Undecidability
Intro to Theory of Computation
Presentation transcript:

Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance Independent random varialbes Today: Are all infinities the same? CMPSC 360 1/18/2019

How do we compare infinities? Are there more natural numbers or reals? computer programs or computational problems? How do we compare infinities?

How Do We Compare Sizes of Sets? Question: Are there more students or brooms? Answer: The same number. Find a bijection.

How Do We Compare Sets (Groups of Items)? Question: Are there more students or brooms? When we count, we find a bijection between items and natural numbers (1, 2, 3, 4, …). 1 2 3 4 5

To show that infinite sets have the same number of items, we also find a bijection.

Are There More Natural or Even Numbers? More natural numbers: all even numbers are natural, but odd numbers are also natural. No, the same number. We just have to find a bijection to match natural numbers and even numbers.

Are There More Natural or Even Numbers? It is enough to find one pairing (or correspondence). The fact that others do not work is irrelevant. This issue does not arise with finite sets. Natural numbers Even numbers 1 2 2 4 3 6 4 8 … x 2x Answer: The same.

Are There More Natural Numbers or Integers? -4 -3 -2 -1 1 2 3 4 5 Can’t be the same: integers go to infinity in two directions! Actually, the same. Let’s find a bijection.

Are There More Natural Numbers or Integers? -4 -3 -2 -1 1 2 3 4 5 Natural numbers Integers 1 2 1 3 -1 4 2 5 -2 … Answer: The same.

Are There More Natural Numbers or Points with Integer Coordinates on the Plane? 1 (0,0) 2 (1,0) 2 3 (1,1) 4 (1,0) 1 … -4 -3 -2 -1 1 2 3 4 5 -1 -2 Answer: The same.

Are There More Natural or Rational Numbers? 1 1 1 2 3 4 5 -4 -3 -2 -1 (𝑥,𝑦) represents 𝑥 𝑦 2 3 -1 4 -2 … Answer: The same.

Countable Sets Sets that are either finite or have the same cardinality as the set of natural numbers are called countable. The sets of even numbers, integers, points on the plane with integer coordinates, rational numbers are countable. When we count, we find a correspondence between items and natural numbers (1, 2, 3, 4, …). c

Creator of Set Theory Georg Cantor 1845--1918

Is the Set of Real Numbers Countable? I don’t think so. We will run out of natural numbers before we can match up all reals. How can you be sure there isn’t some clever bijection? Cantor proved it!

The Set of Reals Between 0 and 1 is not Countable Suppose it is countable. Then there is a bijection. Natural numbers Reals between 0 and 1 1 0 . 2 4 5 4 4 5 2 1 7 0 … 2 2 0 . 4 7 2 1 1 1 5 0 3 7 … 7 3 0 . 2 0 1 4 1 2 0 4 1 5 … 1 4 0 . 1 2 3 4 5 6 7 8 9 0 … 4 5 0 . 0 3 1 3 1 3 1 3 3 3 … … 1 We can write a number which is different from every number on the list: 0 . 1 1 1 … It can’t be a bijection!

There are more reals than natural numbers!

Are there more programs or problems? Wow! This is counterintuitive! Can we do some computer science now? Are there more programs or problems?

Is the Set of Computer Programs Countable? What is a computer program? It is a set of precise instructions written in some programming language. Can we list them like we listed rational numbers? Nice idea!

Is the Set of Computer Programs Countable? Yes, we can list them all: First, all programs of length 1. Second, all programs of length 2. Then, all programs of length 3. And so on...

What is a Computational Problem?

What is a Computational Problem? It has an input and an output. The simplest problems correspond to YES/NO questions about natural numbers. Example: Input: a natural number Question: is it odd? Answer: YES/NO Other questions: Is it prime? Is it a power of 2?...

YES/NO Problems About Natural Numbers For each such problem, we can write correct answers on numbers Question: is it odd? YES NO YES NO YES NO YES… Question: Is it prime? NO YES YES NO YES NO YES… Is it a power of 2? YES YES NO YES NO NO NO… 1 2 3 4 5 6 7 …

How Many Problems Are There? Suppose there is a bijection with natural numbers Problems (with correct answers) Natural numbers 1 2 3 4 5 6 … 1 YES YES NO YES NO NO … YES 2 No NO YES NO YES NO … NO 3 YES NO YES NO YES NO … YES 4 YES YES YES YES NO YES… YES 5 NO NO NO YES NO NO … … NO We can find a problem which is different from every problem on the list: NO YES NO NO YES … It can’t be a bijection!

There are more computational problems than programs There are more computational problems than programs! Not all problems can be solved by computers.

Are there any useful problems that can’t be solved by computers?

There is no program that solves this problem! The Halting problem Given a source code for a program, <P> an input string s for P decide whether P halts on s. There is no program that solves this problem!

Proof : the Halting problem is undecidable Suppose for the sake of contradiction that program H decides the Halting problem: On input (<P>, s), H outputs 𝐘𝐄𝐒 if P halts on s. NO if it does not.

Proof : the Halting problem is undecidable We write a new program G that uses H as subroutine. G=``On input <P>, Run H on input (<P>,<P>). If H outputs NO, halt; else enter an infinite loop.’’ What does G do on input <G>?

Proof : the Halting problem is undecidable We write a new program G that uses H as subroutine. G=``On input <P>, Run H on input (<P>,<P>). If H outputs NO, halt; else enter an infinite loop.’’ If H says that G halts on <G>, then G loops on <G>. If H says that G loops on <G>, then G halts on <G>. A contradiction!

There are more computational problems than programs. Summary There are more computational problems than programs. Some really useful problems, like the Halting problem, can’t be solved by computer program.