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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 2
3 Preliminaries Define set of problems Observation about programs
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 4
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}
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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}
Image of page 7

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

View Full Document Right Arrow Icon
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}
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern