Presentation is loading. Please wait.

Presentation is loading. Please wait.

Opracowanie językowe dr inż. J. Jarnicki

Similar presentations


Presentation on theme: "Opracowanie językowe dr inż. J. Jarnicki"— Presentation transcript:

1 Opracowanie językowe dr inż. J. Jarnicki
Internet Engineering Czesław Smutnicki Discrete Mathematics – Computational Complexity

2 CONTENTS Asymptotic notation Decision/optimization problems Calculation models Turing machines Problem, instances, data coding Complexity classes Polynomial-time algorithms Theory of NP-completness Approximate methods Quality measures of approximation Analysis of quality measures Calculation cost Competitive analysis (on-line algorithms) Inapproximality theory

3 ASYMPTOTIC NOTATION – symbol O(n)
Definition Examples

4 ASYMPTOTIC NOTATION – symbol  (n)
Definition Examples

5 ASYMPTOTIC NOTATION – symbol (n)
Definition Examples

6 ASYMPTOTIC NOTATION - symbol o(n)
Definition Examples

7 ASYMPTOTIC NOTATION - symbol (n)
Definition Examples

8 DECISION/OPTIMIZATION PROBLEMS
decision problem: answer yes-no 2-partition problem: given numbers Does a set exist such that optimization problem: find min or max of the goal function value knapsack problem: given numbers , and Find the set such that , any optimization problem can be transformed into decision problem knapsack problem: given numbers , , and . Does a set exist such that ,

9 CALCULATION MODELS i o i o S Simple machine Finite-state machine
Automata: Mealy Moore Deterministic/non-deterministic finite automata i o S

10 DETERMINISTIC TURING MACHINE
-2 -1 1 2 3 4

11 NON-DETERMINISTIC TURING MACHINE
-2 -1 1 2 3 4

12 CODING Instance I/ Problem P Decimal coding of I Binary coding of I
Unary coding of I Data string x(I) Size N(I) of the instance I Coding of numbers and structural elements

13 COMPUTATIONAL COMPLEXITY FUNCTION
DEPENDS ON: Coding rule Model of calculations (DTM)

14 FUNDAMENTAL COMPLEXITY CLASSES
10 60 n 10-5 s 6·10-5 s n3 10-3 s 2·10-1 s n5 10-1 s 13 m 2n 3366 y Polynomial time algorithm O(p(n)), p – polynomial, solvable by DTM, P class Exponential time algorithm NP class, solvable in O(p(n)) on NDTM = solvable in O(2p(n)) on DTM

15 NP COMPLETE PROBLEMS POLYNOMIAL TIME TRANSFORMATION
PROBLEM P1 IS NP-COMPLETE IF P1 BELONGS TO NP CLASS AND FOR ANY P2 FROM NP CLASS, P2 IS POLYNOMIALLY TRANSFORMABLE TO P1 PROBLEM IS PSEUDO-POLYNOMIAL (NPI CLASS) IF ITS COMPUTATIONAL COMPLEXITY FUNCTION IS A POLYNOMIAL OF N(I) AND MAX(I)

16 COMPLEXITY CLASSES NP CLASS NPI CLASS NP COMPLETE CLASS P CLASS
STRONGLY NP COMPLETE CLASS

17 Thank you for your attention
DISCRETE MATHEMATICS Czesław Smutnicki


Download ppt "Opracowanie językowe dr inż. J. Jarnicki"

Similar presentations


Ads by Google