Slides #2

Today we’ll make the idea of a “reduction” (compiling one problem to another) clearer.

Compiling a source language to a target language makes it so we can take advantage of the tools available for the target language (like running Java or Scala programs, both of which compile to Java Bytecode, on the Java Virtual Machine).

Similarly, reducing a source problem to a target problem means we can take advantage of all the tools available for the target problem, including algorithms that solve it. Basically, 320 is all about learning about a small number of (types of) problems that are good targets for reductions from all kinds of other problems.

Strange fact: Later, we’ll reduce a source problem to a target problem to take advantage of the things we know we CANNOT do in the SOURCE problem.

(Imagine we had a programming language that we KNEW couldn’t be run on any machine. It’s just too AWESOME. If you could write a compiler from the source language to a target language and you had a way to run programs in the target language, then that would mean you COULD run programs in the source language after all, but we know you can’t because of its AWESOMENESS. Therefore, what you’ve really just shown is that the target language is also TOO AWESOME to be run on any machine.)

Leave a Reply

Your email address will not be published. Required fields are marked *