Download presentation

Presentation is loading. Please wait.

Published byGeorgia Booth Modified over 5 years ago

1
CSCI 2670 Introduction to Theory of Computing October 19, 2005

2
Agenda Yesterday –A little more on decidable languages –Countable sets Today –More on countable sets –Diagonalization –An undecidable language

3
Languages we know are decidable LanguageInput A DFA, D is a DFA, w is a string A NFA, N is an NFA, w is a string A REX, R is an RE, w is a string E DFA, D is a DFA and L(D) = EQ DFA L(R), C and D are both DFA’s and L(C) = L(D) R is a regular expression A CFG, G is a CFG, w is a string E CFG, G is a CFG L(G)G is a CFG

4
October 19, 2005 Comparing the size of infinite sets Given two infinite sets A and B, is there any way of determining if |A|=|B| or if |A|>|B|? –Yes! Functional correspondence can show two infinite sets have the same number of elements Diagonalization can show one infinite set has more elements than another

5
October 19, 2005 Functional correspondence Let f be a function from A to B f is called one-to-one if … –f(a 1 ) ≠ f(a 2 ) whenever a 1 ≠ a 2 f is called onto if … –For every b B, there is some a A such that f(a) = b f is called a correspondence if it is one-to-one and onto –A correspondence is a way to pair elements of the two sets

6
October 19, 2005 Countable sets Let N = {1, 2, 3, …} be the set of natural numbers The set A is countable if … –A is finite, or –|A| = |N| Some example of countable sets –Integers –{x | x Z and x = 1 (mod 3)} –All positive primes

7
October 19, 2005 The positive rational numbers Is Q = {m/n | m,n N} countable? –Yes! 1/11/21/31/41/5 2/12/22/32/42/5 3/13/23/33/43/5 4/14/24/34/44/5 5/15/25/35/45/5 Etc…

8
October 19, 2005 The real numbers Is R + (the set of positive real numbers) countable? –No! nf(n) 11.56439… 23.23891… 37.42210… 42.22266… 50.16982… X = 4.1337… Diagonalization

9
October 19, 2005 The set of all infinite binary strings Is the set of all infinite binary strings countable? –No –Diagonalization also works to prove this is not countable On the other hand, the set of finite length binary strings is countable! –Let x b be the binary representation of x –f(x) = x b is 1-to-1 and onto function from N to the set of finite binary strings

10
October 19, 2005 Is the set of all languages in Σ * countable? No –This set has the same cardinality as the set of binary strings Σ * = {ε, a, b, aa, ab, ba, bb, aaa, aab, …} A = { a, ab, aaa, …} A = 0 1 0 0 1 0 0 1 …

11
October 19, 2005 Σ * vs. languages in Σ * The set Σ* is countable –Let |Σ| = n –Every string in Σ* can be associated with a unique number by enumerating Σ* –Let f(x) be the string associated with x The set of all languages in Σ*is the power set of Σ*

12
October 19, 2005 Is the set of all TM’s countable? Yes Since all Turing machines can be represented by a string, the set of all Turing machines are countable Theorem: Some languages are not Turing-recognizable Proof: There are more languages than there are Turing machines

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google