• No results found

Polynomial-Time Computational Problems

Figure 4.2 The operation of machine D

4.3.1 Polynomial-Time Computational Problems

By definition, is the class of polynomial-time language recognition problems. A language recognition problem is a decisional problem. For every possible input, a decisional problem requires YES or NO as output. However, class is sufficiently general to enclose polynomial- time computational problems. For every possible input, a computational problem requires an output to be more general than a YES/NO answer. Since a Turing machine can write symbols to a tape, it can of course output information more general than a YES/NO answer.

For instance, we can design another Turing machine which will not only recognize any instance x DIV3, but will also output upon recognition of x. Let this new machine be named Div3- Comp. A very simple way to realize Div3-Comp is to have its input written in the base-3 representation. Then the input is an instance in DIV3 if and only if its final digit is 0, and the output from the machine, upon recognition of the input, should be the content on the input-tape after having erased the last 0 unless 0 is the only symbol on the tape. If one insists that Div3- Comp must only input and output binary numbers, then Div3-Comp can be realized as follows. It first translates an input x from the base-2 representation into the base-3 representation, and upon obtaining in the base-3 representation it translates the number back to the base-2 representation as the final output. It is evident that these translations can be done digit-by-digit mechanically in c · |x| moves where c is a constant. To this end we know

where C is a constant. From this example we see evidently that the class must include the problem which can be solved by Div3-Comp.

A general argument for to enclose polynomial-time computational problems can be given as follows. A computing device in the so-called von Neumann architecture (that is, the modern

• Table of Contents

Modern Cryptography: Theory and Practice By Wenbo Mao Hewlett-Packard Company

Publisher: Prentice Hall PTR Pub Date: July 25, 2003

ISBN: 0-13-066943-1 Pages: 648

Many cryptographic schemes and protocols, especially those based on public-keycryptography, have basic or so-called "textbook crypto" versions, as these versionsare usually the subjects for many textbooks on cryptography. This book takes adifferent approach to introducing

cryptography: it pays much more attention tofit-for-application aspects of cryptography. It explains why "textbook crypto" isonly good in an ideal world where data are random and bad guys behave nicely.It reveals the general unfitness of "textbook crypto" for the real world by demonstratingnumerous attacks on such schemes, protocols and systems under variousreal- world application scenarios. This book chooses to introduce a set of practicalcryptographic schemes, protocols and systems, many of them standards or de factoones, studies them closely, explains their working principles, discusses their practicalusages, and examines their strong (i.e., fit-for-application) security properties, oftenwith security evidence formally established. The book also includes self-containedtheoretical background material that is the foundation for modern cryptography.

computer architecture we are familiar with, [227]) has a counter, a memory, and a central processor unit (CPU) which can perform one of the following basic instructions, called micro- instructions, at a time:

Load: Loading the content in a memory location to

a register (in CPU)

Store: Storing the content of a register to a memory location

Add: Adding contents of two registers

Comp: Complementing the content of a register (for

subtraction via "Add")

Jump: Setting the counter to a new value

JumpZ: "Jump" upon zero content of a register (for conditional branching)

Stop: Terminating.

It is well known (see e.g., §1.4 of [9]) that the above small set of micro-instructions is sufficient for constructing algorithms for solving arbitrary arithmetic problems on a von Neumann

computer (however notice that by "arbitrary arithmetic problems" we do not mean to consider instances of arbitrary sizes; we will further discuss this in a moment). It can be shown (e.g., Theorem 1.3 in [9]) that each micro-instruction in the above set can be simulated by a Turing machine in polynomial time. Consequently, a problem that can be solved in polynomial time on a von Neumann computer (which implies that the number of micro-instructions used in the

algorithm must be a polynomial in the size of the input to the algorithm) can also be solved by a Turing machine in polynomial time. This is because for any polynomials p(n) and q(n), any ways of arithmetic combining p(n), q(n), p(q(n)) and q(p(n)) will result in a polynomial in n. Notice that we have deliberately excluded multiplication and division from our (simplified) set of micro- instructions. A multiplication between numbers of size n can be done via n additions and hence has its total cost should be measured by n x cost (Add). Division has the same cost as

multiplication since it is repeated subtraction which is addition of a complementary number. We should mention an unimportant difference between the computation model based on Turing machines and that based on von Neumann computers. By Definition 4.1, we regard a problem solvable on a Turing machine only if any instance is solvable on the same machine ("one

machine to solve them all!"). The cost for solving a problem on a Turing machine is measured by the size of the problem in a uniform manner across the whole spectrum of the size of the

problem. There is no need to have a pre-determined bound for the size of a problem. Machine Div3 in Example 4.1 shows this evidently. Due to this property in cost measurement we say that the Turing-machine-based computation model uses the uniform cost measure to measure complexities. In contrast, registers and logical circuits which are the basic building blocks of a von Neumann computer have fixed sizes. As a result, problems solvable on a von Neumann computer must also have a pre-determined size: for the same problem, the bigger an instance is, the bigger a machine is needed for solving it. In general, machines of different sizes do not agree on a uniform measurement on the cost for solving the same problem. We therefore say that a circuit-based computation model (upon which a von Neumann computer is based) has a

non-uniform cost measure. However, so far, the difference between the uniform and non- uniform cost measures has not created any new complexity class, or caused any known classes to collapse. That is why we say that this difference is not important.

• Table of Contents

Modern Cryptography: Theory and Practice By Wenbo Mao Hewlett-Packard Company

Publisher: Prentice Hall PTR Pub Date: July 25, 2003

ISBN: 0-13-066943-1 Pages: 648

Many cryptographic schemes and protocols, especially those based on public-keycryptography, have basic or so-called "textbook crypto" versions, as these versionsare usually the subjects for many textbooks on cryptography. This book takes adifferent approach to introducing

cryptography: it pays much more attention tofit-for-application aspects of cryptography. It explains why "textbook crypto" isonly good in an ideal world where data are random and bad guys behave nicely.It reveals the general unfitness of "textbook crypto" for the real world by demonstratingnumerous attacks on such schemes, protocols and systems under variousreal- world application scenarios. This book chooses to introduce a set of practicalcryptographic schemes, protocols and systems, many of them standards or de factoones, studies them closely, explains their working principles, discusses their practicalusages, and examines their strong (i.e., fit-for-application) security properties, oftenwith security evidence formally established. The book also includes self-containedtheoretical background material that is the foundation for modern cryptography.

a computational problem, and the difference among a Turing machine, a modern computer, a procedure, or an algorithm. Decisional or computational problems will be generally called problems, while machines, computers, procedures or algorithms will be generally referred to as methods or algorithms. Occasionally, we will return to describing a language recognition

problem, and only then we will return to using Turing machines as our basic instrument of computation.

Related documents