170 likes | 291 Views
Internet Engineering Czesław Smutnicki Discrete Mathematics – Computational Complexity. CONTENT S. Asymptotic notation Decision/optimization problems Calculation models Turing machines Problem, instances, data coding Complexity classes Polynomial-time algorithms
E N D
Internet Engineering Czesław Smutnicki DiscreteMathematics– ComputationalComplexity
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
ASYMPTOTIC NOTATION – symbol O(n) Definition Examples
ASYMPTOTIC NOTATION – symbol (n) Definition Examples
ASYMPTOTIC NOTATION – symbol (n) Definition Examples
ASYMPTOTIC NOTATION - symbol o(n) Definition Examples
ASYMPTOTIC NOTATION - symbol (n) Definition Examples
DECISION/OPTIMIZATION PROBLEMS • decision problem: answer yes-no 2-partition problem: givennumbers. Does a set exist such that • optimization problem: find min or max of the goal function value knapsack problem:givennumbers , and . Find the set such that , • any optimization problem can be transformed into decision problem knapsack problem:givennumbers , , and . Does a setexist such that ,
CALCULATION MODELS i o • Simple machine • Finite-state machine • Automata: Mealy Moore • Deterministic/non-deterministic finite automata i o S
DETERMINISTIC TURING MACHINE s -2 -1 0 … 1 2 3 4
NON-DETERMINISTIC TURING MACHINE s -2 -1 0 … 1 2 3 4
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
COMPUTATIONAL COMPLEXITY FUNCTION DEPENDS ON: • Coding rule • Model of calculations (DTM)
FUNDAMENTAL COMPLEXITY CLASSES 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
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)
COMPLEXITY CLASSES NP CLASS NPI CLASS NP COMPLETE CLASS P CLASS STRONGLY NP COMPLETE CLASS
Thank you for your attention DISCRETE MATHEMATICS Czesław Smutnicki