Download presentation
Presentation is loading. Please wait.
Published byΛαλαγη Αλεξανδρίδης Modified over 6 years ago
1
Functional Properties and Problem Reduction
Lecture 36 Wed, Nov 22, 2002
2
Properties of Programs
A Turing Machine may also be called a program. Given a property of programs, each program either has or does not have that property. A property is called trivial if either every program has it or no program has it.
3
Properties as Languages
For a given property, let L be the set of all encoded programs P such that P has the property. Then L is a language. Thus, we may view properties of programs as languages.
4
Functional Properties
Let f : be a function. Let Pf be the set of all programs that compute f. A property L is called functional if there exists a function f such that either P L for all P Pf, or P L for all P Pf.
5
Functional Properties
Thus, functional properties are characterized entirely by the program’s input and output, not the internal details of how the output was obtained.
6
Examples of Functional Properties
The following properties are functional. M halts whenever the input is a positive integer. M never halts. M computes the lexicographical successor of the input, if the input contains no embedded blanks.
7
Examples of Non-Functional Properties
The following properties are not functional. M contains more than 3 transitions. M contains exactly 12 states. M computes the successor of the input provided the computation can be done in no more than 100 transitions.
8
Problem Reduction Often we solve one problem by reducing it to another problem that we already know how to solve. For example, given two points on the surface of a cone, how do we find the shortest line on the cone from one point to the other?
9
Problem Reduction The solution:
Cut the cone from the vertex to the edge. Lay it out flat. Draw a straight line from one point to the other on the flat surface. Tape the cut back together again. The line on the cone is the shortest line between the two points.
10
Reducing Languages The problem we want to solve is the membership problem for a language L. Let L1 and L2 be languages. We say that L1 is reducible to L2 if there exists a Turing computable function r : * * such that for every w *, w L1 if and only if r(w) L2.
11
Reducing Languages Thus, we can solve the membership problem for L1 if
We can solve the membership problem for L2, and We can design a Turing Machine that reduces L1 to L2. Then to determine whether w L1, we compute r(w) and see if it is in L2.
12
Reducibility and Decidability
Theorem: Suppose L1 is reducible to L2. Then If L2 is decidable, then L1 is also decidable. If L1 is undecidable, then L2 is also undecidable.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.