• 検索結果がありません。

EXP TIME(2 p(l) )

N/A
N/A
Protected

Academic year: 2021

シェア "EXP TIME(2 p(l) )"

Copied!
16
0
0

読み込み中.... (全文を見る)

全文

(1)

第5章 代表的な計算量クラス

5.1.

代表的な時間計算量クラス

P TIME(p(l))

E TIME(2 cl )

EXP TIME(2 p(l) )

C

集合: 計算量クラスCに入る集合.

C

問題:

C

集合の認識問題

∪ ∪ c>1 p:

多項式

≡ ∪ p:

多項式

ある問題が

P

に入っていないなら、

現実的には手に負えない

1/8

(2)

Chapter 5

Representative Complexity Classes

5.1. Representative time complexity classes

P TIME(p(l))

E TIME(2 cl )

EXP TIME(2 p(l) )

C set

set in the complexity class C

C problem

problem of recognizing a C set.

∪ ∪ p:polynomial c>1

≡ ∪ p:polynomial

Problems not in P are intractable from the practical viewpoint…

1/8

(3)

5.1:

クラス

P, E, EXP

では,多項式時間程度の違いは問題 ではない.

P:

多項式 × 多項式

Æ

多項式

E:

2の線形乗 × 多項式

Æ

2の線形乗

EXP:

2の多項式乗 × 多項式

Æ

2の多項式乗

5.2: PRIME

の計算量クラス

4.7 Æ PRIME TIME(2 l )

故に,

PRIME E

定義

5.1. T:

制限時間の集合

TIME(t): T

時間計算量クラス

t T

定理

5.1: (1) P =

c>0 TIME(l c ), (2) EXP =

c>0 TIME(2 l c )

余談

: 2002

年に

のアルゴリズムが考案 されたので、今では

P

) ( l

6

O

2/8

→これを

TIME(T)

と表す.

(4)

Ex.5.1: Polynomial makes no serious difference in the classes P, E, EXP

P: polynomial

×

polynomialÆpolynomial

E: linear power of 2

×

polynomial Æ linear power of 2 EXP: poly. power of 2

×

poly. Æ poly. power of 2

Ex.5.2: Complexity class of PRIME Ex.4.7 Æ PRIME TIME(2 l ) Thus

PRIME E

Def.5.1: T: set of time limits

TIME(t): T time complexity class

t T

Theorem5.1 (1) P =

U

TIME(l c ), (2) EXP =

U

TIME(2 l c )

c>0 c>0

time algorithm put it in P!!

) ( l

6

O

2/8

It is denoted by TIME(T)

(5)

定理

5.1: (1) P =

c>0 TIME(l c ), (2) EXP =

c>0 TIME(2 l c )

証明

: (2)

の証明は省略.

T 1 : n c

という形の多項式の集合.

T 2 :

多項式の全体

Æ T 1

T 2

なので,

TIME(T 1 )

TIME(T 2 ) p:

任意の多項式

(p

T 2

の任意の要素)

多項式

p

の最大次数を

k

とすると,

p(n) = O(n k )

定理

4.3

より,

TIME(p(l))

TIME(l k )

TIME(T 1 )

したがって,

TIME(T 1 )

TIME(T 2 )

証明終

3/8

(6)

Theorem 5.1: (1) P =

c>0 TIME(l c ), (2) EXP =

c>0 TIME(2 l c )

Proof: The proof of (2) is omitted.

T 1 : set of polynomials of the form of n c

T 2 : set of all polynomials

Æ since T 1

T 2

TIME(T 1 )

TIME(T 2 ) p: arbitrary polynomial (p is any element of T 2

if the maximum degree of a polynomial p is k

p(n) = O(n k ) From Theorem 4.3

TIME(p(l))

TIME(l k )

TIME(T 1 ) Therefore

TIME(T 1 )

TIME(T 2 )

Q.E.D.

3/8

(7)

5.3.

命題論理式評価問題

(PROP-EVAL)

入力:

<F, < a 1 , a 2 , … , a n >>

F

は拡張命題論理式

(a 1 , a 2 , … , a n

)は

F

に対する真理値割り当て 質問:

F(a 1 , a 2 , … , a n ) = 1?

∧ ∨ ¬ →

1 1

(1,1)

0 0

(1,0)

0 1

(0,1)

1 1

(0,0)

x y

((x → y) ∧ (y → x)) xy

( ¬ xy) (x,y)

4/8

(8)

Ex.5.3. Problem of evaluating propositional expression(PROP-EVAL) Input

<F, < a 1 , a 2 , … , a n >>

F is an extended prop. expression

(a 1 , a 2 , … , a n

is a truth assignment to F Question

F(a 1 , a 2 , … , a n ) =1?

1 1

(1,1)

0 0

(1,0)

0 1

(0,1)

1 1

(0,0)

x y

((x → y) ∧ (y → x)) xy

( ¬ xy) (x,y)

4/8

(9)

5.3.

命題論理式評価問題

(PROP-EVAL)

入力:

<F, < a 1 , a 2 , … , a n >>

F

は拡張命題論理式

(a 1 , a 2 , … , a n

)は

F

に対する真理値割り当て 質問:

F(a 1 , a 2 , … , a n ) = 1?

拡張命題論理式

F

がコード化されたもの から計算木を作る.

計算木は

O(| | 3 )

時間で構成できる.

計算木が得られていれば,ボトムアップ式で

F(a 1 , a 2 , … , a n )

の値は容易に計算可能.

例:

F(x 1 , x 2 , x 3 ) = [x 1 x 2 ] [x 1 x 3 ]

∧ ∨ ¬ →

⎡ ⎤ F

⎡ ⎤ F

¬

¬

x 1 x 2 x 3

計算木

F(0,1,0)=1

0 1 0

0

0 1

1

F(1,1,0)=0

1

1 0

0

0 0

0

5/8

よって

PROP-EVAL

∈ P

(10)

Ex.5.3. Problem of evaluating propositional expression(PROP-EVAL) Input

<F, < a 1 , a 2 , … , a n >>

F is an extended prop. expression

(a 1 , a 2 , … , a n

is a truth assignment to F Question

F(a 1 , a 2 , … , a n ) = 1?

Construct a computation tree from a code of ext. prop. expression It is built in time O(| | 3 )

If computation tree is available, we can easily obtain the value F(a 1 , a 2 , … , a n ) in a bottom-up fashion.

Ex.

F(x 1 , x 2 , x 3 ) = [x 1 x 2 ] [x 1 x 3 ]

⎡ ⎤ F

⎡ ⎤ F

¬

¬

x 1 x 2 x 3

computation tree

5/8

Hence PROP-EVAL

∈ P

F(0,1,0)=1

0 1 0

0

0 1

1

F(1,1,0)=0

1

1 0

0

0 0

0

(11)

5.3.

命題論理式充足性問題:2和積形

(2SAT)

入力:

<F, < a 1 , a 2 , … , a n >> F

2

和積形命題論理式 質問:

F(a 1 , a 2 , … , a n ) = 1

を満たす割り当てがあるか

?

和積形

:

F = ( ●∨●∨ …

∨●

)

( ●∨ …

∨●

)

(…) -

リテラルの論理和の論理積で表現されたもの

k

和積形

(k SAT)

-

和積形の各論理和が

k

個のリテラルを含む

- 3SAT, 4SAT

も同様に定義できる。

6/8

- SAT:

各論理和のリテラルの個数に制限がないもの

- ExSAT:

入力が拡張命題論理式

(

→や

も許す

)

ちょうど

/

たかだか

(12)

Ex. 5.3. 2-Satisfiability (2SAT)

Input

<F, < a 1 , a 2 , … , a n >> F is 2-conjunctive normal form

Question

Is there any assignment such that F(a 1 , a 2 , … , a n ) = 1?

Conjunctive Normal Form (CNF)

F = ( ●∨●∨ …

∨●

)

( ●∨ …

∨●

)

(…) - described by

of

of literals.

k SAT

- Each closure contains k literals

- We can define 3SAT, 4SAT similarly.

6/8

- SAT consists of any CNF.

- ExSAT consists of any extended propositional expression.

exactly/at most

(13)

5.4:

到達可能性問題

(ST-CON)

入力:

<G,s,t> :

無向グラフ

G, 1

s,t

n(=|G|)

質問:

G

上で

s

から

t

への道があるか

?

5.4:

一筆書き閉路問題

(DEULER)

入力:

<G>:

有向グラフ

G

質問:

G

はオイラー閉路をもつか

?

¾

閉路とは、始点と終点が同じである路

¾

オイラー閉路とは、すべての辺を一度づつ通る閉路

¾

ハミルトン閉路とは、すべての頂点を一度づつ通る閉路

5.5:

ハミルトン閉路問題

(DHAM)

入力:

<G>:

有向グラフ

G

質問:

G

はハミルトン閉路をもつか

?

7/8

(14)

Ex. 5.4: Graph reachability problem (ST-CON)

Input

<G,s,t> : an undirectd graph G, 1

s,t

n(=|G|) Question

Does G have a path from s to t?

Ex. 5.4: Euler cycle problem (DEULER) Input

<G>: a directed graph G

Question

Does G have an Euler cycle?

¾Cycle is a path that shares two endpoints.

¾Euler cycle is a cycle that visits all edges once.

¾Hamiltonian cycle is a cycle that visits all vertices once.

Ex. 5.5 Hamiltonian cycle problem (DHAM) Input

<G>: a directed graph G

Question

Does G have a Hamiltonian cycle?

7/8

(15)

知られていること:

¾

以下の問題はP:

9 PROP-EVAL, 2SAT, ST-CON, DEULER

¾

以下の問題はEであることはわかっているが

… 9 3SAT, DHAM

PとEの間にある

(?)

クラスNP

8/8

(16)

It is known that

¾The following problems are in

P:

9 PROP-EVAL, 2SAT, ST-CON, DEULER

¾The following problems are in

E

, but…

9 3SAT, DHAM

The class

NP

between

P

and

E

?

8/8

参照

関連したドキュメント

Department of Mathematics, Beijing Jiaotong University, Beijing, P. Several sets of games have been considered earlier to better understand the behaviour of mis`ere games. We

In this paper we analyze some problems related to quadratic transformations in the variable of a given system of monic orthogonal polynomials (MOPS).. The first problem to be

The goal of this paper is to accomplish this, assuming general apriori estimates (see (1.13) and (1.15) below) for the fundamental solution of the heat equation of the

The analysis presented in this article has been motivated by numerical studies obtained by the model both for the case of curve dynamics in the plane (see [8], and [10]), and for

Zhang, “The G /G-expansion method and travelling wave solutions of nonlinear evolution equations in mathematical physics,” Physics Letters A, vol. Li, “Application of the G

As a special case of that general result, we obtain new fractional inequalities involving fractional integrals and derivatives of Riemann-Liouville type1. Consequently, we get

のようにすべきだと考えていますか。 やっと開通します。長野、太田地区方面  

I.7 This polynomial occurs naturally in our previous work, where it is conjec- tured to give a representation theoretical interpretation to the coefficients K ˜ λµ (q, t). I.8