# Module05 - Module 5 Topics Proof of the existence of...

This preview shows pages 1–9. Sign up to view the full content.

1 Module 5 Topics Proof of the existence of unsolvable problems Proof Technique There are more problems/languages than there are programs/algorithms Countable and uncountable infinities

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Overview We will show that there are more problems than programs Actually more problems than programs in any computational model (programming language) Implication Some problems are not solvable
3 Preliminaries Define set of problems Observation about programs

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Define set of problems We will restrict the set of problems to be the set of language recognition problems over the alphabet {a}. That is Universe: {a}* Yes Inputs: Some language L subset of {a}* No Inputs: {a}* - L
5 Set of Problems * The number of distinct problems is given by the number of languages L subset of {a}* 2 {a}* is our shorthand for this set of subset languages Examples of languages L subset of {a}* 0 elements: { } 1 element: {/\}, {a}, {aa}, {aaa}, {aaaa}, … 2 elements: {/\, a}, {/\, aa}, {a, aa}, … Infinite # of elements: {a n | n is even}, {a n | n is prime}, {a n | n is a perfect square}

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Infinity and {a}* All strings in {a}* have finite length The number of strings in {a}* is infinite The number of languages L in 2 {a}* is infinite The number of strings in a language L in 2 {a}* may be finite or infinite
7 Define set of programs The set of programs we will consider are the set of legal C++ programs as defined in earlier lectures Key Observation Each C++ program can be thought of as a finite length string over alphabet Σ P Σ P = {a, …, z, A, …, Z, 0, …, 9, white space, punctuation}

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Example * int main(int A[], int n){ {26 characters including newline} int i, max; {13 characters including initial tab} {1 character: newline} if (n < 1) {12 characters} return (“Illegal Input”); {28 characters including 2 tabs}
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern