Θεωρητική Πληροφορική Ι (ΣΗΜΜΥ) Υπολογιστική Πολυπλοκότητα Εργαστήριο Λογικής και Επιστήμης Υπολογισμών Εθνικό Μετσόβιο Πολυτεχνείο

Save this PDF as:

Μέγεθος: px
Εμφάνιση ξεκινά από τη σελίδα:

Download "Θεωρητική Πληροφορική Ι (ΣΗΜΜΥ) Υπολογιστική Πολυπλοκότητα Εργαστήριο Λογικής και Επιστήμης Υπολογισμών Εθνικό Μετσόβιο Πολυτεχνείο"

Transcript

1 Θεωρητική Πληροφορική Ι (ΣΗΜΜΥ) Υπολογιστική Πολυπλοκότητα Εργαστήριο Λογικής και Επιστήμης Υπολογισμών Εθνικό Μετσόβιο Πολυτεχνείο

2 Πληροφορίες Μαθήματος Θεωρητική Πληροφορική Ι (ΣΗΜΜΥ) Υπολογιστική Πολυπλοκότητα (ΑΛΜΑ) Διδάσκοντες: Σ. Ζάχος, Ά. Παγουρτζής Βοηθοί Διδασκαλίας: Α. Αντωνόπουλος, Α. Χαλκή Επιμέλεια Διαφανειών: Α. Αντωνόπουλος Δευτέρα: 17:00-20:00 (1.1.31, Παλιά Κτίρια ΗΜΜΥ, ΕΜΠ) Πέμπτη: 15:00-17:00 (1.1.31, Παλιά Κτίρια ΗΜΜΥ, ΕΜΠ) Ωρες Γραφείου: Μετά από κάθε μάθημα, Παρασκευή 13:00-14:00 Σελίδα: Βαθμολόγηση: Διαγώνισμα: Ασκήσεις: Ομιλία: Quiz : 6 μονάδες 2 μονάδες 2 μονάδες 1 μονάδα

3 Computational Complexity Graduate Course Antonis Antonopoulos Computation and Reasoning Laboratory National Technical University of Athens This work is licensed under a Creative Commons Attribution- NonCommercial- NoDerivatives 4.0 International License. e16f245f8d7a e9404b c1317

4 Bibliography Textbooks 1 C. Papadimitriou, Computational Complexity, Addison Wesley, S. Arora, B. Barak, Computational Complexity: A Modern Approach, Cambridge University Press, O. Goldreich, Computational Complexity: A Conceptual Perspective, Cambridge University Press, 2008 Lecture Notes 1 L. Trevisan, Lecture Notes in Computational Complexity, 2002, UC Berkeley 2 J. Katz, Notes on Complexity Theory, 2011, University of Maryland

5 Algorithms & Complexity Turing Machines Undecidability Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

6 Algorithms & Complexity Turing Machines Undecidability Why Complexity? Computational Complexity: Quantifying the amount of computational resources required to solve a given task. Classify computational problems according to their inherent difficulty in complexity classes, and prove relations among them. Structural Complexity: The study of the relations between various complexity classes and the global properties of individual classes. [...] The goal of structural complexity is a thorough understanding of the relations between the various complexity classes and the internal structure of these complexity classes. [J. Hartmanis]

7 Algorithms & Complexity Turing Machines Undecidability Problems... Decision Problems Have answers of the form yes or no Encoding: each instance x of the problem is represented as a string of an alphabet Σ ( Σ 2). Decision problems have the form Is x in L?, where L is a language, L Σ. So, for an encoding of the input, using the alphabet Σ, we associate the following language with the decision problem Π: L(Π) = {x Σ x is a representation of a yes instance of the problem Π} Example Given a number x, is this number prime? (x? PRIMES) Given graph G and a number k, is there a clique with k (or more) nodes in G?

8 Algorithms & Complexity Turing Machines Undecidability Problems... Optimization Problems Example For each instance x there is a set of Feasible Solutions F (x). To each s F (x) we map a positive integer c(x), using the objective function c(s). We search for the solution s F (x) which minimizes (or maximizes) the objective function c(s). The Traveling Salesperson Problem (TSP): Given a finite set C = {c 1,..., c n } of cities and a distance d(c i, c j ) Z +, (c i, c j ) C 2, we ask for a permutation π of C, that minimizes this quantity: n 1 d(c π(i), c π(i+1) ) + d(c π(n), c π(1) ) i=1

9 Algorithms & Complexity Turing Machines Undecidability Problems... A Model Discussion There are many computational models (RAM, Turing Machines etc). The Church-Turing Thesis states that all computation models are equivalent. That is, every computation model can be simulated by a Turing Machine. In Complexity Theory, we consider efficiently computable the problems which are solved (aka the languages that are decided) in polynomial number of steps (Edmonds-Cobham Thesis). Efficiently Computable Polynomial-Time Computable

10 Algorithms & Complexity Turing Machines Undecidability Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

11 Algorithms & Complexity Turing Machines Undecidability Definitions Definition A Turing Machine M is a quintuple M = (Q, Σ, δ, q 0, F ): Q = {q 0, q 1, q 2, q 3,..., q n, q yes, q no } is a finite set of states. Σ is the alphabet. The tape alphabet is Γ = Σ { }. q 0 Q is the initial state. F Q is the set of final states. δ : (Q \ F ) Γ Q Γ {S, L, R} is the transition function. A TM is a programming language with a single data structure (a tape), and a cursor, which moves left and right on the tape. Function δ is the program of the machine.

12 Algorithms & Complexity Turing Machines Undecidability Definitions Turing Machines and Languages Definition Let L Σ be a language and M a TM such that, for every string x Σ : If x L, then M(x) = yes If x / L, then M(x) = no Then we say that M decides L. Alternatively, we say that M(x) = L(x), where L(x) = χ L (x) is the characteristic function of L (if we consider 1 as yes and 0 as no ). If L is decided by some TM M, then L is called a recursive language.

13 Algorithms & Complexity Turing Machines Undecidability Definitions Definition If for a language L there is a TM M, which if x L then M(x) = yes, and if x / L then M(x), we call L recursively enumerable. *By M(x) we mean that M does not halt on input x (it runs forever). Theorem If L is recursive, then it is recursively enumerable. Proof: Exercise Definition If f is a function, f : Σ Σ, we say that a TM M computes f if, for any string x Σ, M(x) = f (x). If such M exists, f is called a recursive function. Turing Machines can be thought as algorithms for solving string related problems.

14 Algorithms & Complexity Turing Machines Undecidability Definitions Multitape Turing Machines We can extend the previous Turing Machine definition to obtain a Turing Machine with multiple tapes: Definition A k-tape Turing Machine M is a quintuple M = (Q, Σ, δ, q 0, F ): Q = {q 0, q 1, q 2, q 3,..., q n, q halt, q yes, q no } is a finite set of states. Σ is the alphabet. The tape alphabet is Γ = Σ { }. q 0 Q is the initial state. F Q is the set of final states. δ : (Q \ F ) Γ k Q (Γ {S, L, R}) k is the transition function.

15 Algorithms & Complexity Turing Machines Undecidability Properties of Turing Machines Bounds on Turing Machines We will characterize the performance of a Turing Machine by the amount of time and space required on instances of size n, when these amounts are expressed as a function of n. Definition Let T : N N. We say that machine M operates within time T (n) if, for any input string x, the time required by M to reach a final state is at most T ( x ). Function T is a time bound for M. Definition Let S : N N. We say that machine M operates within space S(n) if, for any input string x, M visits at most S( x ) locations on its work tapes (excluding the input tape) during its computation. Function S is a space bound for M.

16 Algorithms & Complexity Turing Machines Undecidability Properties of Turing Machines Multitape Turing Machines Theorem Given any k-tape Turing Machine M operating within time T (n), we can construct a TM M operating within time O ( T 2 (n) ) such that, for any input x Σ, M(x) = M (x). Proof: See Th.2.1 (p.30) in [1]. This is a strong evidence of the robustness of our model: Adding a bounded number of strings does not increase their computational capabilities, and affects their efficiency only polynomially.

17 Algorithms & Complexity Turing Machines Undecidability Properties of Turing Machines Linear Speedup Theorem Let M be a TM that decides L Σ, that operates within time T (n). Then, for every ε > 0, there is a TM M which decides the same language and operates within time T (n) = εt (n) + n + 2. Proof: See Th.2.2 (p.32) in [1]. If, for example, T is linear, i.e. something like cn, then this theorem states that the constant c can be made arbitrarily close to 1. So, it is fair to start using the O ( ) notation in our time bounds. A similar theorem holds for space: Theorem Let M be a TM that decides L Σ, that operates within space S(n). Then, for every ε > 0, there is a TM M which decides the same language and operates within space S (n) = εs(n) + 2.

18 Algorithms & Complexity Turing Machines Undecidability NTMs Nondeterministic Turing Machines We will now introduce an unrealistic model of computation: Definition A Turing Machine M is a quintuple M = (Q, Σ, δ, q 0, F ): Q = {q 0, q 1, q 2, q 3,..., q n, q halt, q yes, q no } is a finite set of states. Σ is the alphabet. The tape alphabet is Γ = Σ { }. q 0 Q is the initial state. F Q is the set of final states. δ : (Q \ F ) Γ Pow(Q Γ {S, L, R}) is the transition relation.

19 Algorithms & Complexity Turing Machines Undecidability NTMs Nondeterministic Turing Machines In this model, an input is accepted if there is some sequence of nondeterministic choices that results in yes. An input is rejected if there is no sequence of choices that lead to acceptance. Observe the similarity with recursively enumerable languages. Definition We say that M operates within bound T (n), if for every input x Σ and every sequence of nondeterministic choices, M reaches a final state within T ( x ) steps. The above definition requires that M does not have computation paths longer than T (n), where n = x the length of the input. The amount of time charged is the depth of the computation tree.

20 Algorithms & Complexity Turing Machines Undecidability Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

21 Algorithms & Complexity Turing Machines Undecidability Diagonalization Diagonalization Suppose there is a town with just one barber, who is male. In this town, the barber shaves all those, and only those, men in town who do not shave themselves. Who shaves the barber? Diagonalization is a technique that was used in many different cases:

22 Algorithms & Complexity Turing Machines Undecidability Diagonalization Diagonalization Theorem The functions from N to N are uncountable. Proof: Let, for the sake of contradiction that are countable: φ 1, φ 2,.... Consider the following function: f (x) = φ x (x) + 1. This function must appear somewhere in this enumeration, so let φ y = f (x). Then φ y (x) = φ x (x) + 1, and if we choose y as an argument, then φ y (y) = φ y (y) + 1. Theorem Using the same argument: The functions from {0, 1} to {0, 1} are uncountable.

23 Algorithms & Complexity Turing Machines Undecidability Simulation Machines as strings It is obvious that we can represent a Turing Machine as a string: just write down the description and encode it using an alphabet, e.g. {0, 1}. We denote by M the TM M s representation as a string. Also, if x Σ, we denote by M x the TM that x represents. Keep in mind that: Every string represents some TM. Every TM is represented by infinitely many strings. There exists (at least) a noncomputable function from {0, 1} to {0, 1}, since the set of all TMs is countable.

24 Algorithms & Complexity Turing Machines Undecidability Simulation The Universal Turing Machine So far, our computational models are specified to solve a single problem. Turing observed that there is a TM that can simulate any other TM M, given M s description as input. Theorem There exists a TM U such that for every x, w Σ, U(x, w) = M w (x). Also, if M w halts within T steps on input x, then U(x, w) halts within CT log T steps, where C is a constant indepedent of x, and depending only on M w s alphabet size number of tapes and number of states. Proof: See section 3.1 in [1], and Th. 1.9 and section 1.7 in [2].

25 Algorithms & Complexity Turing Machines Undecidability Undecidability The Halting Problem Consider the following problem: Given the description of a TM M, and a string x, will M halt on input x? This is called the HALTING PROBLEM. We want to compute this problem!!! (Given a computer program and an input, will this program enter an infinite loop?) In language form: H = { M ; x M(x) }, where means that the machine halts, and that it runs forever. Theorem H is recursively enumerable. Proof: See Th.3.1 (p.59) in [1] In fact, H is not just a recursively enumerable language: If we had an algorithm for deciding H, then we would be able to derive an algorithm for deciding any r.e. language (RE-complete).

26 Algorithms & Complexity Turing Machines Undecidability Undecidability The Halting Problem But... Theorem H is not recursive. Proof: See Th.3.1 (p.60) in [1] Suppose, for the sake of contradiction, that there is a TM M H that decides H. Consider the TM D: D( M ) : if M H ( M ; M ) = yes then else yes What is D( D )? If D( D ), then M H accepts the input, so D ; D H, so D(D). If D( D ), then M H rejects D ; D, so D ; D / H, so D(D).

27 Algorithms & Complexity Turing Machines Undecidability Undecidability Recursive languages are a proper subset of recursive enumerable ones. Recall that the complement of a language L is defined as: Theorem 1 If L is recursive, so is L. L = {x Σ x / L} = Σ \ L 2 L is recursive if and only if L and L are recursively enumerable. Proof: Exercise Let E(M) = {x (q 0,, ε) M (q, y x, ε} E(M) is the language enumerated by M. Theorem L is recursively enumerable iff there is a TM M such that L = E(M).

28 Algorithms & Complexity Turing Machines Undecidability Undecidability More Undecidability The HALTING PROBLEM, our first undecidable problem, was the first, but not the only undecidable problem. Its spawns a wide range of such problems, via reductions. To show that a problem A is undecidable we establish that, if there is an algorithm for A, then there would be an algorithm for H, which is absurd. Theorem The following languages are not recursive: 1 {M M halts on all inputs} 2 {M; x There is a y such that M(x) = y} 3 {M; x The computation of M uses all states of M} 4 {M; x; y M(x) = y}

29 Algorithms & Complexity Turing Machines Undecidability Undecidability Rice s Theorem The previous problems lead us to a more general conlusion: Any non-trivial property of Turing Machines is undecidable If a TM M accepts a language L, we write L = L(M): Theorem (Rice s Theorem) Suppose that C is a proper, non-empty subset of the set of all recursively enumerable languages. Then, the following problem is undecidable: Given a Turing Machine M, is L(M) C?

30 Algorithms & Complexity Turing Machines Undecidability Undecidability Rice s Theorem Proof: See Th.3.2 (p.62) in [1] We can assume that / C (why?). Since C is nonempty, L C, accepted by the TM M L. Let M H the TM deciding the HALTING PROBLEM for an arbitrary input x. For each x Σ, we construct a TM M as follows: M(y) : if M H (x) = yes then M L (y) else We claim that: L(M) C if and only if x H. Proof of the claim: If x H, then M H (x) = yes, and so M will accept y or never halt, depending on whether y L. Then the language accepted by M is exactly L, which is in C. If M H (x), M never halts, and thus M accepts the language, which is not in C.

31 Complexity Classes Oracles & The Polynomial Hierarchy Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

32 Complexity Classes Oracles & The Polynomial Hierarchy Introduction Parameters used to define complexity classes: Model of Computation (Turing Machine, RAM, Circuits) Mode of Computation (Deterministic, Nondeterministic, Probabilistic) Complexity Measures (Time, Space, Circuit Size-Depth) Other Parameters (Randomization, Interaction)

33 Complexity Classes Oracles & The Polynomial Hierarchy Introduction Our first complexity classes Definition Let L Σ, and T, S : N N: We say that L DTIME[T (n)] if there exists a TM M deciding L, which operates within the time bound O (T (n)), where n = x. We say that L DSPACE[S(n)] if there exists a TM M deciding L, which operates within space bound O (S(n)), that is, for any input x, requires space at most S( x ). We say that L NTIME[T (n)] if there exists a nondeterministic TM M deciding L, which operates within the time bound O (T (n)). We say that L NSPACE[S(n)] if there exists a nondeterministic TM M deciding L, which operates within space bound O (S(n)).

34 Complexity Classes Oracles & The Polynomial Hierarchy Introduction Our first complexity classes The above are Complexity Classes, in the sense that they are sets of languages. All these classes are parameterized by a function T or S, so they are families of classes (for each function we obtain a complexity class). Definition (Complementary complexity class) For any complexity class C, coc denotes the class: {L L C}, where L = Σ \ L = {x Σ x / L}. We want to define reasonable complexity classes, in the sense that we want to compute more problems, given more computational resources.

35 Complexity Classes Oracles & The Polynomial Hierarchy Constructible Functions Constructible Functions Can we use all computable functions to define Complexity Classes? Theorem (Gap Theorem) For any computable functions r and a, there exists a computable function f such that f (n) a(n), and DTIME[f (n)] = DTIME[r(f (n))] That means, for r(n) = 2 2f (n), the incementation from f (n) to 2 2f (n) does not allow the computation of any new function! So, we must use some restricted families of functions:

36 Complexity Classes Oracles & The Polynomial Hierarchy Constructible Functions Constructible Functions Definition (Time-Constructible Function) A nondecreasing function T : N N is time constructible if T (n) n and there is a TM M that computes the function x T ( x ) in time T (n). Definition (Space-Constructible Function) A nondecreasing function S : N N is space-constructible if S(n) > log n and there is a TM M that computes S( x ) using S( x ) space, given x as input. The restriction T (n) n is to allow the machine to read its input. The restriction S(n) > log n is to allow the machine to remember the index of the cell of the input tape that it is currently reading. Also, if f 1 (n), f 2 (n) are time/space-constructible functions, so are f 1 + f 2, f 1 f 2 and f f2 1.

37 Complexity Classes Oracles & The Polynomial Hierarchy Complexity Classes Constructible Functions Theorem (Hierarchy Theorems) Let t 1, t 2 be time-constructible functions, and s 1, s 2 be space-constructible functions. Then: 1 If t 1 (n) log t 1 (n) = o(t 2 (n)), then DTIME(t 1 ) DTIME(t 2 ). 2 If t 1 (n + 1) = o(t 2 (n)), then NTIME(t 1 ) NTIME(t 2 ). 3 If s 1 (n) = o(s 2 (n)), then DSPACE(s 1 ) DSPACE(s 2 ). 4 If s 1 (n) = o(s 2 (n)), then NSPACE(s 1 ) NSPACE(s 2 ).

38 Complexity Classes Oracles & The Polynomial Hierarchy Complexity Classes Simplified Case of Deterministic Time Hierarchy Theorem Theorem DTIME[n] DTIME[n 1.5 ] Proof (Diagonalization): See Th.3.1 (p.69) in [2] Let D be the following machine: On input x, run for x 1.4 steps U(M x, x); If U(M x, x) = b, then return 1 b; Else return 0; Clearly, L = L(D) DTIME[n 1.5 ] We claim that L / DTIME[n]: Let L DTIME[n] M : M(x) = D(x) x Σ, and M works for O ( x ) steps. The time to simulate M using U is c x log x, for some c.

39 Complexity Classes Oracles & The Polynomial Hierarchy Complexity Classes Simplified Case of Deterministic Time Hierarchy Theorem Proof (cont d): n 0 : n 1.4 > cn log n n n 0 There exists a x M, s.t. x M = M and x M > n 0 (why?) Then, D(x M ) = 1 M(x M )D(x M ) = 1 M(x M ) (while we have also that D(x) = M(x), x) Contradiction!! So, we have the hierachy: DTIME[n] DTIME[n 2 ] DTIME[n 3 ] We will later see that the class containing the problems we can efficiently solve (recall the Edmonds-Cobham Thesis) is the class P = c N DTIME[nc ].

40 Complexity Classes Oracles & The Polynomial Hierarchy Relations among Complexity Classes Hierarchy Theorems tell us how classes of the same kind relate to each other, when we vary the complexity bound. The most interesting results concern relationships between classes of different kinds: Theorem Suppose that T (n), S(n) are time-constructible and space-constructible functions, respectively.then: 1 DTIME[T (n)] NTIME[T (n)] 2 DSPACE[S(n)] NSPACE[S(n)] 3 NTIME[T (n)] DSPACE[T (n)] 4 NSPACE[S(n)] DTIME[2 O(S(n)) ] Corollary NTIME[T (n)] c>1 DTIME[c T (n) ]

41 Complexity Classes Oracles & The Polynomial Hierarchy Relations among Complexity Classes Proof: See Th.7.4 (p.147) in [1] 1 Trivial 2 Trivial 3 We can simulate the machine for each nondeterministic choice, using at most T (n) steps in each simulation. There are exponentially many simulations, but we can simulate them one-by-one, reusing the same space. 4 Recall the notion of a configuration of a TM: For a k-tape machine, is a 2k 2 tuple: (q, i, w 2, u 2,..., w k 1, u k 1 ) How many configurations are there? Q choices for the state n + 1 choices for i, and Fewer than Σ (2k 2)S(n) for the remaining strings So, the total number of configurations on input size n is at most nc S(n) 1 = 2 O(S(n)).

42 Complexity Classes Oracles & The Polynomial Hierarchy Relations among Complexity Classes Proof (cont d): Definition (Configuration Graph of a TM) The configuration graph of M on input x, denoted G(M, x), has as vertices all the possible configurations, and there is an edge between two vertices C and C if and only if C can be reached from C in one step, according to M s transition function. So, we have reduced this simulation to REACHABILITY* problem (also known as S-T CONN), for which we know there is a poly-time (O ( n 2) ) algorithm. So, the simulation takes ( 2 O(S(n))) 2 2 O(S(n)) steps. *REACHABILITY: Given a graph G and two nodes v 1, v n V, is there a path from v 1 to v n?

43 Complexity Classes Oracles & The Polynomial Hierarchy Relations among Complexity Classes The essential Complexity Hierarchy Definition L = DSPACE[log n] NL = NSPACE[log n] P = c N DTIME[n c ] NP = c N NTIME[n c ] PSPACE = c N DSPACE[n c ] NPSPACE = c N NSPACE[n c ]

44 Complexity Classes Oracles & The Polynomial Hierarchy Relations among Complexity Classes The essential Complexity Hierarchy Definition EXP = c N DTIME[2 nc ] NEXP = c N NTIME[2 nc ] EXPSPACE = c N DSPACE[2 nc ] NEXPSPACE = c N NSPACE[2 nc ] L NL P NP PSPACE NPSPACE EXP NEXP

45 Complexity Classes Oracles & The Polynomial Hierarchy Certificates & Quantifiers Certificate Characterization of NP Definition Let R Σ Σ a binary relation on strings. R is called polynomially decidable if there is a DTM deciding the language {x; y (x, y) R} in polynomial time. R is called polynomially balanced if (x, y) R implies y x k, for some k 1. Theorem Let L Σ be a language. L NP if and only if there is a polynomially decidable and polynomially balanced relation R, such that: L = {x y R(x, y)} This y is called succinct certificate, or witness.

46 Complexity Classes Oracles & The Polynomial Hierarchy Certificates & Quantifiers Proof: See Pr.9.1 (p.181) in [1] ( ) If such an R exists, we can construct the following NTM deciding L: On input x, guess a y, such that y x k, and then test (in poly-time) if (x, y) R. If so, accept, else reject. Observe that an accepting computation exists if and only if x L. ( ) If L NP, then an NTM N that decides L in time x k, for some k. Define the following R: (x, y) R if and only if y is an encoding of an accepting computation of N(x). R is polynomially balanced and decidable (why?), so, given by assumption that N decides L, we have our conclusion.

47 Complexity Classes Oracles & The Polynomial Hierarchy Certificates & Quantifiers Can creativity be automated? As we saw: Class P: Efficient Computation Class NP: Efficient Verification So, if we can efficiently verify a mathematical proof, can we create it efficiently? If P = NP... For every mathematical statement, and given a page limit, we would (quickly) generate a proof, if one exists. Given detailed constraints on an engineering task, we would (quickly) generate a design which meets the given criteria, if one exists. Given data on some phenomenon and modeling restrictions, we would (quickly) generate a theory to explain the data, if one exists. See A. Wigderson: Knowledge, Creativity and P versus NP

48 Complexity Classes Oracles & The Polynomial Hierarchy Certificates & Quantifiers Complementary complexity classes Deterministic complexity classes are in general closed under complement (col = L, cop = P, copspace = PSPACE). Complementaries of non-deterministic complexity classes are very interesting: The class conp contains all the languages that have succinct disqualifications (the analogue of succinct certificate for the class NP). The no instance of a problem in conp has a short proof of its being a no instance. So: P NP conp Note the similarity and the difference with R = RE core.

49 Complexity Classes Oracles & The Polynomial Hierarchy Certificates & Quantifiers Quantifier Characterization of Complexity Classes Definition We denote as C = (Q 1 /Q 2 ), where Q 1, Q 2 {, }, the class C of languages L satisfying: x L Q 1 y R(x, y) x / L Q 2 y R(x, y) P = ( / ) NP = ( / ) conp = ( / )

50 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Savitch s Theorem REACHABILITY NL. See Ex.2.10 (p.48) in [1] Theorem (Savitch s Theorem) REACHABILITY DSPACE[log 2 n] Proof: See Th.7.4 (p.149) in [1] REACH(x, y, i) : There is a path from x to y, of length i. We can solve REACHABILITY if we can compute REACH(x, y, n), for any nodes x, y V, since any path in G can be at most n long. If i = 1, we can check whether REACH(x, y, i). If i > 1, we use recursion:

51 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation def REACH (s,t,k) if k ==1: if (s==t or (s,t) in edges ): return true if k >1: for u in vertices : if ( REACH (s,u, floor (k /2) ) and ( REACH (u,t, ceil (k /2) ))): return true return false We generate all nodes u one after the other, reusing space. The algorithm has recursion depth of log n. For each recursion level, we have to store s, t, k and u, that is, O (log n) space. Thus, the total space used is O ( log 2 n ).

52 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Savitch s Theorem Corollary NSPACE[S(n)] DSPACE[S 2 (n)], for any space-constructible function S(n) log n. Proof: Let M be the nondeterministic TM to be simulated. We run the algorithm of Savitch s Theorem proof on the configuration graph of M on input x. Since the configuration graph has c S(n) nodes, O ( S 2 (n) ) space suffices. Corollary PSPACE = NPSPACE

53 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation NL-Completeness In Complexity Theory, we connect problems in a complexity class with partial ordering relations, called reductions, which formalize the notion of a problem that is at least as hard as another. A reduction must be computationally weaker than the class in which we use it. Definition A language L 1 is logspace reducible to a language L 2, denoted L 1 l m L 2, if there is a function f : Σ Σ, computable by a DTM in O (log n) space, such that for all x Σ : x L 1 f (x) L 2 We say that a language A is NL-complete if it is in NL and for every B NL, B l m A.

54 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation NL-Completeness Theorem REACHABILITY is NL-complete. Proof: See Th.4.18 (p.89) in [2] We ve argued why REACHABILITY NL. Let L NL, that is, it is decided by a O (log n) NTM N. Given input x, we can construct the configuration graph of N(x). We can assume that this graph has a single accepting node. We can construct this in logspace: Given configurations C, C we can in space O ( C + C ) = O (log x ) check the graph s adjacency matrix if they are connected by an edge. It is clear that x L if and only if the produced instance of REACHABILITY has a yes answer.

55 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Certificate Definition of NL We want to give a characterization of NL, similar to the one we gave for NP. A certificate may be polynomially long, so a logspace machine may not have the space to store it. So, we will assume that the certificate is provided to the machine on a separate tape that is read once.

56 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Certificate Definition of NL Definition A language L is in NL if there exists a deterministic TM M with an additional special read-once input tape, such that for every x Σ : x L y, y poly( x ), M(x, y) = 1 where by M(x, y) we denote the output of M where x is placed on its input tape, and y is placed on its special read-once tape, and M uses at most O (log x ) space on its read-write tapes for every input x. What if remove the read-once restriction and allow the TM s head to move back and forth on the certificate, and read each bit multiple times?

57 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Immerman-Szelepscényi Theorem (The Immerman-Szelepscényi Theorem) REACHABILITY NL Proof: See Th.4.20 (p.91) in [2] It suffices to show a O (log n) verification algorithm A such that: (G, s, t), a polynomial certificate u such that: A((G, s, t), u) = yes iff t is not reachable from s. A has read-once access to u. G s vertices are identified by numbers in {1,..., n} = [n] C i : The set of vertices reachable from s in i steps. Membership in C i is easily certified: i [n]: v 0,..., v k along the path from s to v, k i. The certificate is at most polynomial in n.

58 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation The Immerman-Szelepscényi Theorem Proof (cont d): We can check the certificate using read-once access: 1 v 0 = s 2 for j > 0, (v j 1, v j ) E(G) 3 v k = v 4 Path ends within at most i steps We now construct two types of certificates: 1 A certificate that a vertex v / C i, given C i. 2 A certificate that C i = c, for some c, given C i 1. Since C 0 = {s}, we can provide the 2nd certificate to convince the verifier for the sizes of C 1,..., C n C n is the set of vertices reachable from s.

59 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation The Immerman-Szelepscényi Theorem Proof (cont d): Since the verifier has been convinced of C n, we can use the 1st type of certificate to convince the verifier that t / C n. Certifying that v / C i, given C i The certificate is the list of certificates that u C i, for every u C i. The verifier will check: 1 Each certificate is valid 2 Vertex u, given a certificate for u, is larger than the previous. 3 No certificate is provided for v. 4 The total number of certificates is exactly C i.

60 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation The Immerman-Szelepscényi Theorem Proof (cont d): Certifying that v / C i, given C i 1 The certificate is the list of certificates that u C i 1, for every u C i 1 The verifier will check: 1 Each certificate is valid 2 Vertex u, given a certificate for u, is larger than the previous. 3 No certificate is provided for v or for a neighbour of v. 4 The total number of certificates is exactly C i 1. Certifying that C i = c, given C i 1 The certificate will consist of n certificates, for vertices 1 to n, in ascending order. The verifier will check all certificates, and count the vertices that have been certified to be in C i. If C i = c, it accepts.

61 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation The Immerman-Szelepscényi Theorem Corollary For every space constructible S(n) > log n: NSPACE[S(n)] = conspace[s(n)] Proof: Let L NSPACE[S(n)]. We will show that S(n) space-bounded NTM M deciding L: M on input x uses the above certification procedure on the configuration graph of M. Corollary NL = conl

62 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation What about Undirected Reachability? UNDIRECTED REACHABILITY captures the phenomenon of configuration graphs with both directions. H. Lewis and C. Papadimitriou defined the class SL (Symmetric Logspace) as the class of languages decided by a Symmetric Turing Machine using logarithmic space. Obviously, L SL NL As in the case of NL, UNDIRECTED REACHABILITY is SL-complete. But in 2004, Omer Reingold showed, using expander graphs, a deterministic logspace algorithm for UNDIRECTED REACHABILITY, so: Theorem (Reingold, 2004) L = SL

63 Complexity Classes Oracles & The Polynomial Hierarchy Space Computation Our Complexity Hierarchy Landscape NEXP EXP PSPACE = NPSPACE conp P NL = conl L NPCNP

64 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Karp Reductions Definition A language L 1 is Karp reducible to a language L 2, denoted by L 1 p m L 2, if there is a function f : Σ Σ, computable by a polynomial-time DTM, such that for all x Σ : x L 1 f (x) L 2 Definition Let C be a complexity class. We say that a language A is C-hard (or p m-hard for C) if for every B C, B p m A. We say that a language A is C-complete, if it is C-hard, and also A C.

65 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Karp reductions vs logspace redutions Theorem A logspace reduction is a polynomial-time reduction. Proof: See Th.8.1 (p.160) in [1] Let M the logspace reduction TM. M has 2 O(log n) possible configurations. The machine is deterministic, so no configuration can be repeated in the computation. So, the computation takes O ( n k) time, for some k.

66 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Circuits and CVP Definition (Boolean circuits) For every n N an n-input, single output Boolean Circuit C is a directed acyclic graph with n sources and one sink. All nonsource vertices are called gates and are labeled with one of (and), (or) or (not). The vertices labeled with and have fan-in (i.e. number or incoming edges) 2. The vertices labeled with have fan-in 1. For every vertex v of C, we assign a value as follows: for some input x {0, 1} n, if v is the i-th input vertex then val(v) = x i, and otherwise val(v) is defined recursively by applying v s logical operation on the values of the vertices connected to v. The output C(x) is the value of the output vertex.

67 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Circuits and CVP Definition (CVP) Circuit Value Problem (CVP): Given a circuit C and an assignment x to its variables, determine whether C(x) = 1. Example CVP P. REACHABILITY l m CVP: Graph G circuit R(G): The gates are of the form: g i,j,k, 1 i, j n, 0 k n. h i,j,k, 1 i, j, k n g i,j,k is true iff there is a path from i to j without intermediate nodes bigger than k. h i,j,k is true iff there is a path from i to j without intermediate nodes bigger than k, and k is used.

68 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Circuits and CVP Example Input gates: g i,j,0 is true iff (i = j or (i, j) E(G)). For k = 1,..., n: h i,j,k = (g i,k,k 1 g k,j,k 1 ) For k = 1,..., n: g i,j,k = (g i,j,k 1 h i,j,k ) The output gate g 1,n,n is true iff there is a path from 1 to n using no intermediate paths above n (sic). We also can compute the reduction in logspace: go over all possible i, j, k s and output the appropriate edges and sorts for the variables (1,..., 2n 3 + n 2 ).

69 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Composing Reductions Theorem If L 1 l m L 2 and L 2 l m L 3, then L 1 l m L 3. Proof: See Prop.8.2 (p.164) in [1] Let R, R be the aforementioned reductions. We have to prove that R (R(x)) is a logspace reduction. But R(x) may by longer than log x... We simulate M R by remembering the head position i of the input string of M R, i.e. the output string of M R. If the head moves to the right, we increment i and simulate M R long enough to take the i th bit of the output. If the head stays in the same position, we just remember the i th bit. If the head moves to the left, we decrement i and start M R from the beggining, until we reach the desired bit.

70 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Closure under reductions Complete problems are the maximal elements of the reductions partial ordering. Complete problems capture the essence and difficulty of a complexity class. Definition A class C is closed under reductions if for all A, B Σ : If A B and B C, then A C. P, NP, conp, L, NL, PSPACE, EXP are closed under Karp and logspace reductions. If an NP-complete language is in P, then P = NP. If L is NP-complete, then L is conp-complete. If a conp-complete problem is in NP, then NP = conp.

71 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness P-Completeness Theorem If two classes C and C are both closed under reductions and there is an L Σ complete for both C and C, then C = C. Consider the Computation Table T of a poly-time TM M(x): T ij represents the contents of tape position j at step i. But how to remember the head position and state? At the i th step: if the state is q and the head is in position j, then T ij Σ Q. We say that the table is accepting if T x k 1,j (Σ {q yes }), for some j. Observe that T ij depends only on the contents of the same of adjacent positions at time i 1.

72 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness P-Completeness Theorem CVP is P-complete. Proof: See Th. 8.1 (p.168) in [1] We have to show that for any L P there is a reduction R from L to CVP. R(x) must be a variable-free circuit such that x L R(x) = 1. T ij depends only on T i 1,j 1, T i 1,j, T i 1,j+1. Let Γ = Σ (Σ Q). Encode s Γ as (s 1,..., s m ), where m = log Γ. Then the computation table can be seen as a table of binary entries S ijl, 1 l m. S ijl depends only on the 3m entries S i 1,j 1,l, S i 1,j,l, S i 1,j+1,l,where 1 l m.

73 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness P-Completeness Proof (cont d): So, there are m Boolean Functions f 1,..., f m : {0, 1} 3m {0, 1} s.t.: S ijl = f l ( S i 1,j 1, S i 1,j, S i 1,j+1 ) Thus, there exists a Boolean Circuit C with 3m inputs and m outputs computing T ij. C depends only on M, and has constant size. R(x) will be ( x k 1) ( x k 2) copies of C. The input gates are fixed. R(x) s output gate will be the first bit of C x k 1,1. The circuit C is fixed, so we can generate indexed copies of C, using O (log x ) space for indexing.

74 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness CIRCUIT SAT & SAT Definition (CIRCUIT SAT) Given Boolen Circuit C, is there a truth assignment x appropriate to C, such that C(x) = 1? Definition (SAT) Given a Boolean Expression φ in CNF, is it satisfiable? Example CIRCUIT SAT l m SAT: Given C Boolean Formula R(C), s.t. C(x) = 1 R(C)(x) = T. Variables of C variables of R(C). Gate g of C variable g of R(C).

75 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness CIRCUIT SAT & SAT Example Gate g of C clauses in R(C): g variable gate: add ( g x) (g x) g x g TRUE gate: add (g) g FALSE gate: add ( g) g NOT gate & pred(g) = h: add ( g h) (g h) g h g OR gate & pred(g) = {h, h }: add ( h g) ( h g) (h h g) g (h h ) g AND gate & pred(g) = {h, h }: add ( g h) ( g h ) ( h h g) g (h h ) g output gate: add (g) R(C) is satisfiable if and only if C is. The construction can be done within log x space.

76 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Bounded Halting Problem We can define the time-bounded analogue of HP: Definition (Bounded Halting Problem (BHP)) Given the code M of an NTM M, and input x and a string 0 t, decide if M accepts x in t steps. Theorem BHP is NP-complete. Proof: BHP NP. Let A NP. Then, NTM M deciding A in time p( x ), for some p poly( x ). The reduction is the function R(x) = M, x, 0 p( x ).

77 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Cook s Theorem Theorem (Cook s Theorem) SAT is NP-complete. Proof: See Th.8.2 (p.171) in [1] SAT NP. Let L NP. We will show that L l m CIRCUIT SAT l m SAT. Since L NP, there exists an NPTM M deciding L in n k steps. Let (c 1,..., c n k ) {0, 1} nk a certificate for M (recall the binary encoding of the computation tree).

78 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Cook s Theorem Proof (cont d): See Th.8.2 (p.171) in [1] If we fix a certificate, then the computation is deterministic (the language s Verifier V (x, y) is a DPTM). So, we can define the computation table T (M, x, c ). As before, all non-top row and non-extreme column cells T ij will depend only on T i 1,j 1, T i 1,j, T i 1,j+1 and the nondeterministic choice c i 1. We now fixed a circuit C with 3m + 1 input gates. Thus, we can construct in log x space a circuit R(x) with variable gates c 1,... c n k corresponding to the nondeterministic choices of the machine. R(x) is satisfiable if and only if x L.

79 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness NP-completeness: Web of Reductions Many NP-complete problems stem from Cook s Theorem via reductions: 3SAT, MAX2SAT, NAESAT IS, CLIQUE, VERTEX COVER, MAX CUT TSP (D), 3COL SET COVER, PARTITION, KNAPSACK, BIN PACKING INTEGER PROGRAMMING (IP): Given m inequalities oven n variables u i {0, 1}, is there an assignment satisfying all the inequalities? Always remember that these are decision versions of the corresponding optimization problems. But 2SAT, 2COL P.

80 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness NP-completeness: Web of Reductions Example SAT l m IP: Every clause can be expressed as an inequality, eg: (x 1 x 2 x 3 ) x 1 + (1 x 2 ) + (1 x 3 ) 1 This method is generalized by the notion of Constraint Satisfaction Problems. A Constraint Satisfaction Problem (CSP) generalizes SAT by allowing clauses of arbitrary form (instead of ORs of literals). 3SAT is the subcase of qcsp, where arity q = 3 and the con- are ORs of the involved straints literals.

81 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Quantified Boolean Formulas Definition (Quantified Boolean Formula) A Quantified Boolean Formula F is a formula of the form: F = x 1 x 2 x 3 Q n x n φ(x 1,..., x n ) where φ is plain (quantifier-free) boolean formula. Example Let TQBF the language of all true QBFs. F = x 1 x 2 x 3 [(x 1 x 2 ) ( x 2 x 3 ) ( x 1 x 2 x 3 )] The above is a True QBF ((1, 0, 0) and (1, 1, 1) satisfy it).

82 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Quantified Boolean Formulas Theorem TQBF is PSPACE-complete. Proof: See Th (p.456) in [1] Th.4.13 (p.84) in [2] TQBF PSPACE: Let φ be a QBF, with n variables and length m. Recursive algorithm A(φ): If n = 0, then there are only constants, hence O (m) time/space. If n > 0: A(φ) = A (φ x1=0) A (φ x1=1), if Q 1 =, and A(φ) = A (φ x1=0) A (φ x1=1), if Q 1 =. Both recursive computations can be run on the same space. So space n,m = space n 1,m + O (m) space n,m = O (n m).

83 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Quantified Boolean Formulas Proof (cont d): See Th (p.456) in [1] Th.4.13 (p.84) in [2] Now, let M a TM with space bound p(n). We can create the configuration graph of M(x), having size 2 O(p(n)). M accepts x iff there is a path of length at most 2 O(p(n)) from the initial to the accepting configuration. Using Savitch s Theorem idea, for two configurations C and C we have: REACH(C, C, 2 i ) C [ REACH(C, C, 2 i 1 ) REACH(C, C, 2 i 1 ) ] But, this is a bad idea: Doubles the size each time. Instead, we use additional variables: C D 1 D 2 [(D 1 = C D 2 = C ) (D 1 = C D 2 = C )] REACH(D 1, D 2, 2 i 1 )

84 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness Quantified Boolean Formulas Proof (cont d): See Th (p.456) in [1] Th.4.13 (p.84) in [2] The base case of the recursion is C 1 C 2, and can be encoded as a quantifier-free formula. The size of the formula in the i th step is s i s i 1 + O (p(n)) O ( p 2 (n) ).

85 Complexity Classes Oracles & The Polynomial Hierarchy Reductions & Completeness *Logical Characterizations Descriptive complexity is a branch of computational complexity theory and of finite model theory that characterizes complexity classes by the type of logic needed to express the languages in them. Theorem (Fagin s Theorem) The set of all properties expressible in Existential Second-Order Logic is precisely NP. Theorem The class of all properties expressible in Horn Existential Second-Order Logic with Successor is precisely P. HORNSAT is P-complete.

86 Complexity Classes Oracles & The Polynomial Hierarchy Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

87 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes Oracle TMs and Oracle Classes Definition A Turing Machine M? with oracle is a multi-string deterministic TM that has a special string, called query string, and three special states: q? (query state), and q YES, q NO (answer states). Let A Σ be an arbitrary language. The computation of oracle machine M A proceeds like an ordinary TM except for transitions from the query state: From the q? moves to either q YES, q NO, depending on whether the current query string is in A or not. The answer states allow the machine to use this answer to its further computation. The computation of M? with oracle A on iput x is denoted as M A (x).

88 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes Oracle TMs and Oracle Classes Definition Let C be a time complexity class (deterministic or nondeterministic). Define C A to be the class of all languages decided by machines of the same sort and time bound as in C, only that the machines have now oracle access to A. Also, we define: C C 2 1 = L C 2 C L 1. For example, P NP = L NP PL. Note that P SAT = P NP. Theorem There exists an oracle A for which P A = NP A. Proof: Th.14.4, p.340 in [1] Take A to be a PSPACE-complete language.then: PSPACE P A NP A PSPACE A PSPACE.

89 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes Oracle TMs and Oracle Classes Theorem There exists an oracle B for which P B NP B. Proof: Th.14.5, p in [1] We will find a language L NP B \ P B. Let L = {1 n x B with x = n}. L NP B (why?) We will define the oracle B {0, 1} such that L / P B : Let M 1?, M? 2,... an enumeration of all PDTMs with oracle, such that every machine appears infinitely many times in the enumeration. We will define B iteratively: B 0 =, and B = i 0 B i. In i th stage, we have defined B i 1, the set of all strings in B with length < i. Let also X the set of exceptions.

90 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes Proof (cont d): We simulate M B i (1 i ) for i log i steps. How do we answer the oracle questions Is x B? If x < i, we look for x in B i 1. If x B i 1, Mi B goes to q YES Else Mi B goes to q NO If x i, Mi B goes to q NO,and x X. Suppose that after at most i log i steps the machine rejects. Then we define B i = B i 1 {x {0, 1} : x = i, x / X } so 1 i L, and L(M B i ) L. Why {x {0, 1} : x = i, x / X }?? If the machine accepts, we define B i = B i 1, so that 1 i / L. If the machine fails to halt in the allotted time, we set B i = B i 1, but we know that the same machine will appear in the enumeration with an index sufficiently large.

91 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes The Limits of Diagonalization As we saw, an oracle can transfer us to an alternative computational universe. (We saw a universe where P = NP, and another where P NP) Diagonalization is a technique that relies in the facts that: TMs are (effectively) represented by strings. A TM can simulate another without much overhead in time/space. So, diagonalization or any other proof technique relies only on these two facts, holds also for every oracle. Such results are called relativizing results. E.g., P A NP A, for every A {0, 1}. The above two theorems indicate that P vs. NP is a nonrelativizing result, so diagonalization and any other relativizing method doesn t suffice to prove it.

92 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes Cook Reductions A problem A is Cook-Reducible to a problem B, denoted by A p T B, if there is an oracle DTM MB which in polynomial time decides A (making at most polynomial many queries to B). That is: A P B Karp Reducibility Turing Reducibility A p T A Theorem P, PSPACE are closed under p T. Is NP closed under p T? (cf. Problem Sets!)

93 Complexity Classes Oracles & The Polynomial Hierarchy Oracle Classes *Random Oracles We proved that: A Σ : P A = NP A B Σ : P B NP B What if we chose the oracle language at random? Now, consider the set U = Pow(Σ ), and the sets: {A U : P A = NP A } {B U : P B NP B } Can we compare these two sets, and find which is larger? Theorem (Bennet, Gill) Pr B Σ [ P B NP B] = 1 See H. Vollmer & K.W. Wagner, Measure one Results in Computational Complexity Theory

94 Complexity Classes Oracles & The Polynomial Hierarchy The Polynomial Hierarchy The Polynomial Hierarchy Polynomial Hierarchy Definition p 0 = Σp 0 = Πp 0 = P p i+1 = PΣp i Σ p i+1 = NPΣp i Π p i+1 = conpσp i PH i 0 Σ p i Σ p 0 = P p 1 = P, Σp 1 = NP, Πp 1 = conp p 2 = PNP, Σ p 2 = NPNP, Π p 2 = conpnp

95 Complexity Classes Oracles & The Polynomial Hierarchy The Polynomial Hierarchy. p 3 = PNPNP. Σ p i, Πp i Σ p i+1 A, B Σ p i A B Σ p i, A B Σ p i A Π p i Π p 2 = conpnp p 2 = PNP Σ p 2 = NPNP A Σ p i A, B p i A B, A B and A p i Π p 1 = conp Σ p 1 = NP p 0 = Σp 0 = = Π p 0 = p 1 = P

96 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Theorem Let L be a language, and i 1. L Σ p i iff there is a polynomially balanced relation R such that the language {x; y : (x, y) R} is in Π p i 1 and L = {x : y, s.t. : (x, y) R} Proof (by Induction): Th.17.8, p in [1] For i = 1: {x; y : (x, y) R} P,so L = {x y : (x, y) R} NP For i > 1: If R Π p i 1, we must show that L Σp i NTM with Σ p i 1 oracle: NTM(x) guesses a y and asks Πp i 1 oracle whether (x, y) / R.

97 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Proof (cont.): If L Σ p i, we must show the existence or R: L Σ p i NTM M K, K Σ p i 1, which decides L. K Σ p i 1 S Πp i 2 : (z K w : (z, w) S). We must describe a relation R (we know: x L accepting computation of M K (x)) Query Steps: yes z i has a certificate w i st (z i, w i ) S. So, R(x) = (x, y) R iff yrecords an accepting computation of M? on x, together with a certificate w i for each yes query z i in the computation. We must show {x; y : (x, y) R} Π p i 1 : Check that all steps of M? are legal (poly time). Check that (z i, w i ) S (in Π p i 2, and thus in Πp i 1 ). For all no queries z i, check z i / K (another Π p i 1 ).

98 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Corollary Let L be a language, and i 1. L Π p i iff there is a polynomially balanced relation R such that the language {x; y : (x, y) R} is in Σ p i 1 and Corollary L = {x : y, y x k, s.t. : (x, y) R} Let L be a language, and i 1. L Σ p i iff there is a polynomially balanced, polynomially-time decicable (i + 1)-ary relation R such that: L = {x : y 1 y 2 y 3...Qy i, s.t. : (x, y 1,..., y i ) R} where the i th quantifier Q is, if i is even, and, if i is odd.

99 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Remark Σ p i = ( Q }{{} i / Q i ) Π p }{{} i = ( Q i / Q }{{} i ) }{{} i quantifiers i quantifiers i quantifiers i quantifiers Theorem If for some i 1, Σ p i = Π p i, then for all j > i: Σ p j = Π p j = p j = Σ p i Or, the polynomial hierarchy collapses to the i th level. Proof: Th.17.9, p.427 in [1] It suffices to show that: Σ p i = Π p i Σ p i+1 = Σp i. Let L Σ p i+1 R Πp i : L = {x y : (x, y) R} Π p i = Σ p i R Σ p i (x, y) R z : (x, y, z) S, S Π p i 1. So, x L y; z : (x, y, z) S, S Π p i 1, hence L Σp i.

100 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Corollary If P=NP, or even NP=coNP, the Polynomial Hierarchy collapses to the first level. QSAT i Definition Given expression φ, with Boolean variables partitioned into i sets X i,is φ satisfied by the overall truth assignment of the expression: X 1 X 2 X 3...QX i φ where Q is if i is odd, and if i is even. Theorem For all i 1 QSAT i is Σ p i -complete.

101 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Theorem If there is a PH-complete problem, then the polynomial hierarchy collapses to some finite level. Proof: Th.17.11, p.429 in [1] Let L is PH-complete. Since L PH, i 0 : L Σ p i. But any L Σ p i+1 reduces to L. Since PH is closed under reductions, we imply that L Σ p i, so Σ p i = Σ p i+1. Theorem PH PSPACE PH? = PSPACE (Open). If it was, then PH has complete problems, so it collapses to some finite level.

102 Complexity Classes Oracles & The Polynomial Hierarchy Main Theorems Relativized Results Let s see how the inclusion of the Polynomial Hierarchy to Polynomial Space, and the inclusions of each level of PH to the next relativizes: PH A PSPACE A relative to some oracle A Σ. (Yao 1985, Håstad 1986) Pr A [PH A PSPACE A ] = 1 ( i N) Σ p,a i Pr A [( i N) Σ p,a i (Cai 1986, Babai 1987) Σ p,a i+1 relative to some oracle A Σ. (Yao 1985, Håstad 1986) Σ p,a i+1 ] = 1 (Rossman-Servedio-Tan, 2015)

103 Complexity Classes Oracles & The Polynomial Hierarchy The Complexity of Optimization Problems Self-Reducibility of SAT For a Boolean formula φ with n variables and m clauses. It is easy to see that: φ SAT (φ x1 =0 SAT) (φ x1 =1 SAT) Thus, we can self-reduce SAT to instances of smaller size. Self-Reducibility Tree of depth n: Example φ(x 1, x 2 ) φ x1 =0 φ x1 =1 φ x1 =0,x 2 =0 φ x1 =0,x 2 =1 φ x1 =1,x 2 =0 φ x1 =1,x 2 =1

104 Complexity Classes Oracles & The Polynomial Hierarchy The Complexity of Optimization Problems Self-Reducibility of SAT Definition (FSAT) FSAT: Given a Boolean expression φ, if φ is satisfiable then return a satisfying truth assignment for φ. Otherwise return no. FP is the function analogue of P: it contains functions computable by a DTM in poly-time. FSAT FP SAT P. What about the opposite? If SAT P, we can use the self-reducibility property to fix variables one-by-one, and retrieve a solution. We only need 2n calls to the alleged poly-time algorithm for SAT.

105 Complexity Classes Oracles & The Polynomial Hierarchy The Complexity of Optimization Problems What about TSP? We can solve TSP using a hypothetical algorithm for the NP-complete decision version of TSP: We can find the cost of the optimum tour by binary search (in the interval [0, 2 n ]). When we find the optimum cost C, we fix it, and start changing intercity distances one-by one, by setting each distance to C + 1. We then ask the NP-oracle if there still is a tour of optimum cost at most C: If there is, then this edge is not in the optimum tour. If there is not, we know that this edge is in the optimum tour. After at most n 2 (polynomial) oracle queries, we can extract the optimum tour, and thus have the solution to TSP.

106 Complexity Classes Oracles & The Polynomial Hierarchy The Complexity of Optimization Problems The Classes P NP and FP NP P SAT is the class of languages decided in pol time with a SAT oracle (Polynomial number of adaptive queries). SAT is NP-complete P SAT =P NP. FP NP is the class of functions that can be computed by a poly-time DTM with a SAT oracle. FSAT, TSP FP NP. Definition (Reductions for Function Problems) A function problem A reduces to B if there exists R, S FL such that: Theorem x A R(x) B. If z is a correct output of R(x), then S(z) is a correct output of x. TSP is FP NP -complete.

107 Complexity Classes Oracles & The Polynomial Hierarchy The Complexity of Optimization Problems The Complexity Universe

108 Randomized Computation Non-Uniform Complexity Contents Introduction Turing Machines Undecidability Complexity Classes Oracles & The Polynomial Hierarchy Randomized Computation The map of NP Non-Uniform Complexity Interactive Proofs Inapproximability Derandomization of Complexity Classes Counting Complexity Epilogue

109 Randomized Computation Non-Uniform Complexity Examples of Randomized Algorithms Warmup: Randomized Quicksort Deterministic QuicksortRandomized Quicksort Input: A list L of integers; If n 1 then return L. Else { let i = 1; choose a random integer i, 1 i n; let L 1 be the sublist of L whose elements are < a i ; let L 2 be the sublist of L whose elements are = a i ; let L 3 be the sublist of L whose elements are > a i ; Recursively Quicksort L 1 and L 3 ; return L = L 1 L 2 L 3 ;

110 Randomized Computation Non-Uniform Complexity Examples of Randomized Algorithms Warmup: Randomized Quicksort Let T d the max number of comparisons for the Deterministic Quicksort: T d (n) T d (n 1) + O (n) T d (n) = Ω(n 2 ) Let T r the expected number of comparisons for the Randomized Quicksort: T r 1 n 1 [T r (j) T r (n 1 j)] + O (n) n j=0 T r (n) = O (n log n)

111 Randomized Computation Non-Uniform Complexity Examples of Randomized Algorithms Warmup: Polynomial Identity Testing 1 Two polynomials are equal if they have the same coefficients for corresponding powers of their variable. 2 A polynomial is identically zero if all its coefficients are equal to the additive identity element. 3 How we can test if a polynomial is identically zero? 4 We can choose uniformly at random r 1,..., r n from a set S F. 5 We are wrong with a probability at most: Theorem (Schwartz-Zippel Lemma) Let Q(x 1,..., x n ) F[x 1,..., x n ] be a multivariate polynomial of total degree d. Fix any finite set S F, and let r 1,..., r n be chosen indepedently and uniformly at random from S. Then: Pr[Q(r 1,..., r n ) = 0 Q(x 1,..., x n ) 0] d S

112 Randomized Computation Non-Uniform Complexity Examples of Randomized Algorithms Warmup: Polynomial Identity Testing Proof: (By Induction on n) For n = 1: Pr[Q(r) = 0 Q(x) 0] d/ S For n: Q(x 1,..., x n ) = k x1q i i (x 2,..., x n ) i=0 where k d is the largest exponent of x 1 in Q. deg(q k ) d k Pr[Q k (r 2,..., r n ) = 0] (d k)/ S Suppose that Q k (r 2,..., r n ) 0. Then: q(x 1 ) = Q(x 1, r 2,..., r n ) = k x1q i i (r 2,..., r n ) i=0 deg(q(x 1 )) = k, and q(x 1 ) 0!

113 Randomized Computation Non-Uniform Complexity Examples of Randomized Algorithms Warmup: Polynomial Identity Testing Proof (cont d): The base case now implies that: Pr[q(r 1 ) = Q(r 1,..., r n ) = 0] k/ S Thus, we have shown the following two equalities: Pr[Q k (r 2,..., r n ) = 0] d k S Pr[Q k (r 1, r 2,..., r n ) = 0 Q k (r 2,..., r n ) 0] k S Using the following identity: Pr[E 1 ] Pr[E 1 E 2 ] + Pr[E 2 ] we obtain that the requested probability is no more than the sum of the above, which proves our theorem!

114 Randomized Computation Non-Uniform Complexity Computational Model Probabilistic Turing Machines A Probabilistic Turing Machine is a TM as we know it, but with access to a random source, that is an extra (read-only) tape containing random-bits! Randomization on: Output (one or two-sided) Running Time Definition (Probabilistic Turing Machines) A Probabilistic Turing Machine is a TM with two transition functions δ 0, δ 1. On input x, we choose in each step with probability 1/2 to apply the transition function δ 0 or δ 1, indepedently of all previous choices. We denote by M(x) the random variable corresponding to the output of M at the end of the process. For a function T : N N, we say that M runs in T ( x )-time if it halts on x within T ( x ) steps (regardless of the random choices it makes).

115 Randomized Computation Non-Uniform Complexity Complexity Classes BPP Class Definition (BPP Class) For T : N N, let BPTIME[T (n)] the class of languages L such that there exists a PTM which halts in O (T ( x )) time on input x, and Pr[M(x) = L(x)] 2/3. We define: BPP = c N BPTIME[n c ] The class BPP represents our notion of efficient (randomized) computation! We can also define BPP using certificates:

116 Randomized Computation Non-Uniform Complexity Complexity Classes BPP Class Definition (Alternative Definition of BPP) A language L BPP if there exists a poly-time TM M and a polynomial p poly(n), such that for every x {0, 1} : Pr r {0,1} p(n)[m(x, r) = L(x)] 2 3 P BPP BPP EXP The P vs BPP question.

117 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations Proper formalism (Zachos et al.): Definition (Majority Quantifier) Let R : {0, 1} {0, 1} {0, 1} be a predicate, and ε a rational number, such that ε ( 0, 1 2). We denote by ( + y, y = k)r(x, y) the following predicate: There exist at least ( ε) 2 k strings y of length m for which R(x, y) holds. We call + the overwhelming majority quantifier. + r means that the fraction r of the possible certificates of a certain length satisfy the predicate for the certain input.

118 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations Definition We denote as C = (Q 1 /Q 2 ), where Q 1, Q 2 {,, + }, the class C of languages L satisfying: x L Q 1 y R(x, y) x / L Q 2 y R(x, y) P = ( / ) NP = ( / ) conp = ( / ) BPP = ( + / + ) = cobpp

119 Randomized Computation Non-Uniform Complexity Quantifier Characterizations RP Class In the same way, we can define classes that contain problems with one-sided error: Definition The class RTIME[T (n)] contains every language L for which there exists a PTM M running in O (T ( x )) time such that: x L Pr[M(x) = 1] 2 3 x / L Pr[M(x) = 0] = 1 We define RP = c N RTIME[n c ] Similarly we define the class corp.

120 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations RP NP, since every accepting branch is a certificate! RP BPP, corp BPP RP = ( + / ) ( / ) = NP corp = ( / + ) ( / ) = conp Theorem (Decisive Characterization of BPP) BPP = ( + / + ) = ( + / + ) = ( + / + )

121 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations Proof: Let L BPP. Then, by definition, there exists a polynomial-time computable predicate Q and a polynomial q such that for all x s of length n: Swapping Lemma x L + y Q(x, y) x / L + y Q(x, y) i y + z R(x, y, z) + C y z C R(x, y, z) ii z + y R(x, y, z) C + y z C R(x, y, z) By the above Lemma: x L + z Q(x, z) y + z Q(x, y z) + C y [ (z C) Q(x, y z)], where C denotes (as in the Swapping s Lemma formulation) a set of q(n) strings, each of length q(n).

122 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations Proof (cont d): On the other hand, x / L + y Q(x, z) z + y Q(x, y z) C + y [ (z C) Q(x, y z)]. Now, we only have to assure that the appeared predicates z C Q(x, y z) and z C Q(x, y z) are computable in polynomial time Recall that in Swapping Lemma s formulation we demanded C p(n) and that for each v C : v = p(n). This means that we seek if a string of polynomial length exists, or if the predicate holds for all such strings in a set with polynomial cardinality, procedure which can be surely done in polynomial time.

123 Randomized Computation Non-Uniform Complexity Quantifier Characterizations Quantifier Characterizations Proof (cont d): Conversely, if L ( + / + ), for each string w, w = 2p(n), we have w = w 1 w 2, w 1 = w 2 = p(n). Then: x L + y z R(x, y, z) + w R(x, w 1, w 2 ) x / L y + z R(x, y, z) + w R(x, w 1, w 2 ) So, L BPP. The above characterization is decisive, in the sense that if we replace + with, the two predicates are still complementary (i.e. R 1 R 2 ), so they still define a complexity class. In the above characterization of BPP, if we replace + with, we obtain very easily a well-known result: Corollary (Sipser-Gács Theorem) BPP Σ p 2 Πp 2

124 Randomized Computation Non-Uniform Complexity Quantifier Characterizations ZPP Class And now something completely different: What is the random variable was the running time and not the output? We say that M has expected running time T (n) if the expectation E[T M(x) ] is at most T ( x ) for every x {0, 1}. (T M(x) is the running time of M on input x, and it is a random variable!) Definition The class ZTIME[T (n)] contains all languages L for which there exists a machine M that runs in an expected time O (T ( x )) such that for every input x {0, 1}, whenever M halts on x, the output M(x) it produces is exactly L(x). We define: ZPP = c N ZTIME[n c ]

125 Randomized Computation Non-Uniform Complexity Quantifier Characterizations ZPP Class The output of a ZPP machine is always correct! The problem is that we aren t sure about the running time. We can easily see that ZPP = RP corp. The next Hasse diagram summarizes the previous inclusions: (Recall that Σ p 2 = Σp 2 Πp 2 = NPNP conp NP )

126 Randomized Computation Non-Uniform Complexity Quantifier Characterizations PSPACE Σ p 2 conp NP BPP corp RP ZPP P

127 Randomized Computation Non-Uniform Complexity Quantifier Characterizations PSPACE ( / ) ( / ) ( / ) ( / ) ( + / + ) ( / + ) ( + / ) ( / )

128 Randomized Computation Non-Uniform Complexity Error Reduction Error Reduction for BPP Theorem (Error Reduction for BPP) Let L {0, 1} be a language and suppose that there exists a poly-time PTM M such that for every x {0, 1} : Pr[M(x) = L(x)] x c Then, for every constant d > 0, poly-time PTM M such that for every x {0, 1} : Pr[M (x) = L(x)] 1 2 x d

129 Randomized Computation Non-Uniform Complexity Error Reduction Proof: The machine M does the following: Run M(x) for every input x for k = 8 x 2c+d and obtain outputs y 1, y 2,..., y k {0, 1}. times, If the majority of these outputs is 1, return 1 Otherwise, return 0. We define the r.v. X i for every i [k] to be 1 if y i = L(x) and 0 otherwise. X 1, X 2,..., X k are indepedent Boolean r.v. s, with: E[X i ] = Pr[X i = 1] p = x c Applying a Chernoff Bound we obtain: [ ] k Pr X i pk > δpk < e δ2 4 pk = e 1 4 x 2c x 2c+d 2 x d i=1

130 Randomized Computation Non-Uniform Complexity Error Reduction Intermission: Chernoff Bounds How many samples do we need in order to estimate µ up to an error of ±ε with probability at least 1 δ? Chernoff Bound tells us that this number is O ( ρ/ε 2), where ρ = log(1/δ). The probability that k is ρ n far from µn decays exponentially with ρ.

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2) ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2) Ιωάννης Τόλλης Τμήμα Επιστήμης Υπολογιστών NP-Completeness (2) x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 11 13 21

Διαβάστε περισσότερα

2 Composition. Invertible Mappings

2 Composition. Invertible Mappings Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan Composition. Invertible Mappings In this section we discuss two procedures for creating new mappings from old ones, namely,

Διαβάστε περισσότερα

Every set of first-order formulas is equivalent to an independent set

Every set of first-order formulas is equivalent to an independent set Every set of first-order formulas is equivalent to an independent set May 6, 2008 Abstract A set of first-order formulas, whatever the cardinality of the set of symbols, is equivalent to an independent

Διαβάστε περισσότερα

Lecture 2. Soundness and completeness of propositional logic

Lecture 2. Soundness and completeness of propositional logic Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1 Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness

Διαβάστε περισσότερα

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in : tail in X, head in A nowhere-zero Γ-flow is a Γ-circulation such that

Διαβάστε περισσότερα

Fractional Colorings and Zykov Products of graphs

Fractional Colorings and Zykov Products of graphs Fractional Colorings and Zykov Products of graphs Who? Nichole Schimanski When? July 27, 2011 Graphs A graph, G, consists of a vertex set, V (G), and an edge set, E(G). V (G) is any finite set E(G) is

Διαβάστε περισσότερα

Abstract Storage Devices

Abstract Storage Devices Abstract Storage Devices Robert König Ueli Maurer Stefano Tessaro SOFSEM 2009 January 27, 2009 Outline 1. Motivation: Storage Devices 2. Abstract Storage Devices (ASD s) 3. Reducibility 4. Factoring ASD

Διαβάστε περισσότερα

Αλγόριθμοι και πολυπλοκότητα NP-Completeness

Αλγόριθμοι και πολυπλοκότητα NP-Completeness ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Αλγόριθμοι και πολυπλοκότητα NP-Completeness Ιωάννης Τόλλης Τμήμα Επιστήμης Υπολογιστών NP-Completeness x x x 2 x 2 x 3 x 3 x 4 x 4 2 22 32 3 2 23 3 33 NP-Completeness

Διαβάστε περισσότερα

Other Test Constructions: Likelihood Ratio & Bayes Tests

Other Test Constructions: Likelihood Ratio & Bayes Tests Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :

Διαβάστε περισσότερα

ΑΛΓΟΡΙΘΜΟΙ Άνοιξη I. ΜΗΛΗΣ

ΑΛΓΟΡΙΘΜΟΙ  Άνοιξη I. ΜΗΛΗΣ ΑΛΓΟΡΙΘΜΟΙ http://eclass.aueb.gr/courses/inf6/ Άνοιξη 06 - I. ΜΗΛΗΣ P NP και NP-complete προβλήματα (Κλάσεις Πολυπλοκότητας) ΑΛΓΟΡΙΘΜΟΙ - ΑΝΟΙΞΗ 06 - Ι. ΜΗΛΗΣ 5 NP-COMPLETENESS I Γιατί για πολλά προβλήματα

Διαβάστε περισσότερα

Section 8.3 Trigonometric Equations

Section 8.3 Trigonometric Equations 99 Section 8. Trigonometric Equations Objective 1: Solve Equations Involving One Trigonometric Function. In this section and the next, we will exple how to solving equations involving trigonometric functions.

Διαβάστε περισσότερα

Homework 3 Solutions

Homework 3 Solutions Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For

Διαβάστε περισσότερα

C.S. 430 Assignment 6, Sample Solutions

C.S. 430 Assignment 6, Sample Solutions C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order

Διαβάστε περισσότερα

Concrete Mathematics Exercises from 30 September 2016

Concrete Mathematics Exercises from 30 September 2016 Concrete Mathematics Exercises from 30 September 2016 Silvio Capobianco Exercise 1.7 Let H(n) = J(n + 1) J(n). Equation (1.8) tells us that H(2n) = 2, and H(2n+1) = J(2n+2) J(2n+1) = (2J(n+1) 1) (2J(n)+1)

Διαβάστε περισσότερα

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit Ting Zhang Stanford May 11, 2001 Stanford, 5/11/2001 1 Outline Ordinal Classification Ordinal Addition Ordinal Multiplication Ordinal

Διαβάστε περισσότερα

ST5224: Advanced Statistical Theory II

ST5224: Advanced Statistical Theory II ST5224: Advanced Statistical Theory II 2014/2015: Semester II Tutorial 7 1. Let X be a sample from a population P and consider testing hypotheses H 0 : P = P 0 versus H 1 : P = P 1, where P j is a known

Διαβάστε περισσότερα

Bounding Nonsplitting Enumeration Degrees

Bounding Nonsplitting Enumeration Degrees Bounding Nonsplitting Enumeration Degrees Thomas F. Kent Andrea Sorbi Università degli Studi di Siena Italia July 18, 2007 Goal: Introduce a form of Σ 0 2-permitting for the enumeration degrees. Till now,

Διαβάστε περισσότερα

Chapter 3: Ordinal Numbers

Chapter 3: Ordinal Numbers Chapter 3: Ordinal Numbers There are two kinds of number.. Ordinal numbers (0th), st, 2nd, 3rd, 4th, 5th,..., ω, ω +,... ω2, ω2+,... ω 2... answers to the question What position is... in a sequence? What

Διαβάστε περισσότερα

4.6 Autoregressive Moving Average Model ARMA(1,1)

4.6 Autoregressive Moving Average Model ARMA(1,1) 84 CHAPTER 4. STATIONARY TS MODELS 4.6 Autoregressive Moving Average Model ARMA(,) This section is an introduction to a wide class of models ARMA(p,q) which we will consider in more detail later in this

Διαβάστε περισσότερα

EE512: Error Control Coding

EE512: Error Control Coding EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3

Διαβάστε περισσότερα

The Simply Typed Lambda Calculus

The Simply Typed Lambda Calculus Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and

Διαβάστε περισσότερα

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3 1 State vector space and the dual space Space of wavefunctions The space of wavefunctions is the set of all

Διαβάστε περισσότερα

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch: HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying

Διαβάστε περισσότερα

Congruence Classes of Invertible Matrices of Order 3 over F 2

Congruence Classes of Invertible Matrices of Order 3 over F 2 International Journal of Algebra, Vol. 8, 24, no. 5, 239-246 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/.2988/ija.24.422 Congruence Classes of Invertible Matrices of Order 3 over F 2 Ligong An and

Διαβάστε περισσότερα

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Partial Differential Equations in Biology The boundary element method. March 26, 2013 The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet

Διαβάστε περισσότερα

Statistical Inference I Locally most powerful tests

Statistical Inference I Locally most powerful tests Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided

Διαβάστε περισσότερα

Example Sheet 3 Solutions

Example Sheet 3 Solutions Example Sheet 3 Solutions. i Regular Sturm-Liouville. ii Singular Sturm-Liouville mixed boundary conditions. iii Not Sturm-Liouville ODE is not in Sturm-Liouville form. iv Regular Sturm-Liouville note

Διαβάστε περισσότερα

The challenges of non-stable predicates

The challenges of non-stable predicates The challenges of non-stable predicates Consider a non-stable predicate Φ encoding, say, a safety property. We want to determine whether Φ holds for our program. The challenges of non-stable predicates

Διαβάστε περισσότερα

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R + Chapter 3. Fuzzy Arithmetic 3- Fuzzy arithmetic: ~Addition(+) and subtraction (-): Let A = [a and B = [b, b in R If x [a and y [b, b than x+y [a +b +b Symbolically,we write A(+)B = [a (+)[b, b = [a +b

Διαβάστε περισσότερα

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β 3.4 SUM AND DIFFERENCE FORMULAS Page Theorem cos(αβ cos α cos β -sin α cos(α-β cos α cos β sin α NOTE: cos(αβ cos α cos β cos(α-β cos α -cos β Proof of cos(α-β cos α cos β sin α Let s use a unit circle

Διαβάστε περισσότερα

ΑΛΓΟΡΙΘΜΟΙ Άνοιξη I. ΜΗΛΗΣ

ΑΛΓΟΡΙΘΜΟΙ  Άνοιξη I. ΜΗΛΗΣ ΑΛΓΟΡΙΘΜΟΙ http://eclass.aueb.gr/courses/inf6/ Άνοιξη 26 - I. ΜΗΛΗΣ NP-complete προβλήματα ΑΛΓΟΡΙΘΜΟΙ - ΑΝΟΙΞΗ 26 - Ι. ΜΗΛΗΣ 6 NP-COMPLETENESS II Tree of reductions (partial) Cook s Th. Π NP SAT 3-SAT

Διαβάστε περισσότερα

Approximation of distance between locations on earth given by latitude and longitude

Approximation of distance between locations on earth given by latitude and longitude Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth

Διαβάστε περισσότερα

Matrices and Determinants

Matrices and Determinants Matrices and Determinants SUBJECTIVE PROBLEMS: Q 1. For what value of k do the following system of equations possess a non-trivial (i.e., not all zero) solution over the set of rationals Q? x + ky + 3z

Διαβάστε περισσότερα

Math 6 SL Probability Distributions Practice Test Mark Scheme

Math 6 SL Probability Distributions Practice Test Mark Scheme Math 6 SL Probability Distributions Practice Test Mark Scheme. (a) Note: Award A for vertical line to right of mean, A for shading to right of their vertical line. AA N (b) evidence of recognizing symmetry

Διαβάστε περισσότερα

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required) Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts

Διαβάστε περισσότερα

derivation of the Laplacian from rectangular to spherical coordinates

derivation of the Laplacian from rectangular to spherical coordinates derivation of the Laplacian from rectangular to spherical coordinates swapnizzle 03-03- :5:43 We begin by recognizing the familiar conversion from rectangular to spherical coordinates (note that φ is used

Διαβάστε περισσότερα

Instruction Execution Times

Instruction Execution Times 1 C Execution Times InThisAppendix... Introduction DL330 Execution Times DL330P Execution Times DL340 Execution Times C-2 Execution Times Introduction Data Registers This appendix contains several tables

Διαβάστε περισσότερα

Homomorphism in Intuitionistic Fuzzy Automata

Homomorphism in Intuitionistic Fuzzy Automata International Journal of Fuzzy Mathematics Systems. ISSN 2248-9940 Volume 3, Number 1 (2013), pp. 39-45 Research India Publications http://www.ripublication.com/ijfms.htm Homomorphism in Intuitionistic

Διαβάστε περισσότερα

LTL to Buchi. Overview. Buchi Model Checking LTL Translating LTL into Buchi. Ralf Huuck. Buchi Automata. Example

LTL to Buchi. Overview. Buchi Model Checking LTL Translating LTL into Buchi. Ralf Huuck. Buchi Automata. Example Overview LTL to Buchi Buchi Model Checking LTL Translating LTL into Buchi Ralf Huuck Buchi Automata Example Automaton which accepts infinite traces δ A Buchi automaton is 5-tuple Σ, Q, Q 0,δ, F Σ is a

Διαβάστε περισσότερα

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω 0 1 2 3 4 5 6 ω ω + 1 ω + 2 ω + 3 ω + 4 ω2 ω2 + 1 ω2 + 2 ω2 + 3 ω3 ω3 + 1 ω3 + 2 ω4 ω4 + 1 ω5 ω 2 ω 2 + 1 ω 2 + 2 ω 2 + ω ω 2 + ω + 1 ω 2 + ω2 ω 2 2 ω 2 2 + 1 ω 2 2 + ω ω 2 3 ω 3 ω 3 + 1 ω 3 + ω ω 3 +

Διαβάστε περισσότερα

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Chapter 6: Systems of Linear Differential. be continuous functions on the interval Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations

Διαβάστε περισσότερα

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics Fourier Series MATH 211, Calculus II J. Robert Buchanan Department of Mathematics Spring 2018 Introduction Not all functions can be represented by Taylor series. f (k) (c) A Taylor series f (x) = (x c)

Διαβάστε περισσότερα

New bounds for spherical two-distance sets and equiangular lines

New bounds for spherical two-distance sets and equiangular lines New bounds for spherical two-distance sets and equiangular lines Michigan State University Oct 8-31, 016 Anhui University Definition If X = {x 1, x,, x N } S n 1 (unit sphere in R n ) and x i, x j = a

Διαβάστε περισσότερα

ORDINAL ARITHMETIC JULIAN J. SCHLÖDER

ORDINAL ARITHMETIC JULIAN J. SCHLÖDER ORDINAL ARITHMETIC JULIAN J. SCHLÖDER Abstract. We define ordinal arithmetic and show laws of Left- Monotonicity, Associativity, Distributivity, some minor related properties and the Cantor Normal Form.

Διαβάστε περισσότερα

Problem Set 3: Solutions

Problem Set 3: Solutions CMPSCI 69GG Applied Information Theory Fall 006 Problem Set 3: Solutions. [Cover and Thomas 7.] a Define the following notation, C I p xx; Y max X; Y C I p xx; Ỹ max I X; Ỹ We would like to show that C

Διαβάστε περισσότερα

Αλγόριθμοι και πολυπλοκότητα Depth-First Search

Αλγόριθμοι και πολυπλοκότητα Depth-First Search ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Αλγόριθμοι και πολυπλοκότητα Depth-First Search Ιωάννης Τόλλης Τμήμα Επιστήμης Υπολογιστών Depth-First Search A B D E C Depth-First Search 1 Outline and Reading

Διαβάστε περισσότερα

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with Week 03: C lassification of S econd- Order L inear Equations In last week s lectures we have illustrated how to obtain the general solutions of first order PDEs using the method of characteristics. We

Διαβάστε περισσότερα

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013 Notes on Average Scattering imes and Hall Factors Jesse Maassen and Mar Lundstrom Purdue University November 5, 13 I. Introduction 1 II. Solution of the BE 1 III. Exercises: Woring out average scattering

Διαβάστε περισσότερα

Models for Probabilistic Programs with an Adversary

Models for Probabilistic Programs with an Adversary Models for Probabilistic Programs with an Adversary Robert Rand, Steve Zdancewic University of Pennsylvania Probabilistic Programming Semantics 2016 Interactive Proofs 2/47 Interactive Proofs 2/47 Interactive

Διαβάστε περισσότερα

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition

Διαβάστε περισσότερα

Block Ciphers Modes. Ramki Thurimella

Block Ciphers Modes. Ramki Thurimella Block Ciphers Modes Ramki Thurimella Only Encryption I.e. messages could be modified Should not assume that nonsensical messages do no harm Always must be combined with authentication 2 Padding Must be

Διαβάστε περισσότερα

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =

Διαβάστε περισσότερα

Μηχανική Μάθηση Hypothesis Testing

Μηχανική Μάθηση Hypothesis Testing ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider

Διαβάστε περισσότερα

2. Let H 1 and H 2 be Hilbert spaces and let T : H 1 H 2 be a bounded linear operator. Prove that [T (H 1 )] = N (T ). (6p)

2. Let H 1 and H 2 be Hilbert spaces and let T : H 1 H 2 be a bounded linear operator. Prove that [T (H 1 )] = N (T ). (6p) Uppsala Universitet Matematiska Institutionen Andreas Strömbergsson Prov i matematik Funktionalanalys Kurs: F3B, F4Sy, NVP 2005-03-08 Skrivtid: 9 14 Tillåtna hjälpmedel: Manuella skrivdon, Kreyszigs bok

Διαβάστε περισσότερα

The Probabilistic Method - Probabilistic Techniques. Lecture 7: The Janson Inequality

The Probabilistic Method - Probabilistic Techniques. Lecture 7: The Janson Inequality The Probabilistic Method - Probabilistic Techniques Lecture 7: The Janson Inequality Sotiris Nikoletseas Associate Professor Computer Engineering and Informatics Department 2014-2015 Sotiris Nikoletseas,

Διαβάστε περισσότερα

Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- -----------------

Inverse trigonometric functions & General Solution of Trigonometric Equations. ------------------ ----------------------------- ----------------- Inverse trigonometric functions & General Solution of Trigonometric Equations. 1. Sin ( ) = a) b) c) d) Ans b. Solution : Method 1. Ans a: 17 > 1 a) is rejected. w.k.t Sin ( sin ) = d is rejected. If sin

Διαβάστε περισσότερα

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016 Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Dynamic types, Lambda calculus machines Apr 21 22, 2016 1 Dynamic types and contracts (a) To make sure you understand the

Διαβάστε περισσότερα

Chap. 6 Pushdown Automata

Chap. 6 Pushdown Automata Chap. 6 Pushdown Automata 6.1 Definition of Pushdown Automata Example 6.1 L = {wcw R w (0+1) * } P c 0P0 1P1 1. Start at state q 0, push input symbol onto stack, and stay in q 0. 2. If input symbol is

Διαβάστε περισσότερα

TMA4115 Matematikk 3

TMA4115 Matematikk 3 TMA4115 Matematikk 3 Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet Trondheim Spring 2010 Lecture 12: Mathematics Marvellous Matrices Andrew Stacey Norges Teknisk-Naturvitenskapelige Universitet

Διαβάστε περισσότερα

Tridiagonal matrices. Gérard MEURANT. October, 2008

Tridiagonal matrices. Gérard MEURANT. October, 2008 Tridiagonal matrices Gérard MEURANT October, 2008 1 Similarity 2 Cholesy factorizations 3 Eigenvalues 4 Inverse Similarity Let α 1 ω 1 β 1 α 2 ω 2 T =......... β 2 α 1 ω 1 β 1 α and β i ω i, i = 1,...,

Διαβάστε περισσότερα

Reminders: linear functions

Reminders: linear functions Reminders: linear functions Let U and V be vector spaces over the same field F. Definition A function f : U V is linear if for every u 1, u 2 U, f (u 1 + u 2 ) = f (u 1 ) + f (u 2 ), and for every u U

Διαβάστε περισσότερα

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)

Διαβάστε περισσότερα

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications: UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS 150 Fall 2001 Prof. Subramanian Midterm II 1) You are implementing an 4:1 Multiplexer that has the following specifications:

Διαβάστε περισσότερα

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =? Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Αν κάπου κάνετε κάποιες υποθέσεις να αναφερθούν στη σχετική ερώτηση. Όλα τα αρχεία που αναφέρονται στα προβλήματα βρίσκονται στον ίδιο φάκελο με το εκτελέσιμο

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Ολοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα είναι μικρότεροι το 1000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Διάρκεια: 3,5 ώρες Καλή

Διαβάστε περισσότερα

Section 7.6 Double and Half Angle Formulas

Section 7.6 Double and Half Angle Formulas 09 Section 7. Double and Half Angle Fmulas To derive the double-angles fmulas, we will use the sum of two angles fmulas that we developed in the last section. We will let α θ and β θ: cos(θ) cos(θ + θ)

Διαβάστε περισσότερα

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible. B-Trees Index files can become quite large for large main files Indices on index files are possible 3 rd -level index 2 nd -level index 1 st -level index Main file 1 The 1 st -level index consists of pairs

Διαβάστε περισσότερα

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Chapter 6: Systems of Linear Differential. be continuous functions on the interval Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations

Διαβάστε περισσότερα

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ. Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο The time integral of a force is referred to as impulse, is determined by and is obtained from: Newton s 2 nd Law of motion states that the action

Διαβάστε περισσότερα

Math 446 Homework 3 Solutions. (1). (i): Reverse triangle inequality for metrics: Let (X, d) be a metric space and let x, y, z X.

Math 446 Homework 3 Solutions. (1). (i): Reverse triangle inequality for metrics: Let (X, d) be a metric space and let x, y, z X. Math 446 Homework 3 Solutions. (1). (i): Reverse triangle inequalit for metrics: Let (X, d) be a metric space and let x,, z X. Prove that d(x, z) d(, z) d(x, ). (ii): Reverse triangle inequalit for norms:

Διαβάστε περισσότερα

A Note on Intuitionistic Fuzzy. Equivalence Relation

A Note on Intuitionistic Fuzzy. Equivalence Relation International Mathematical Forum, 5, 2010, no. 67, 3301-3307 A Note on Intuitionistic Fuzzy Equivalence Relation D. K. Basnet Dept. of Mathematics, Assam University Silchar-788011, Assam, India dkbasnet@rediffmail.com

Διαβάστε περισσότερα

Uniform Convergence of Fourier Series Michael Taylor

Uniform Convergence of Fourier Series Michael Taylor Uniform Convergence of Fourier Series Michael Taylor Given f L 1 T 1 ), we consider the partial sums of the Fourier series of f: N 1) S N fθ) = ˆfk)e ikθ. k= N A calculation gives the Dirichlet formula

Διαβάστε περισσότερα

Finite Field Problems: Solutions

Finite Field Problems: Solutions Finite Field Problems: Solutions 1. Let f = x 2 +1 Z 11 [x] and let F = Z 11 [x]/(f), a field. Let Solution: F =11 2 = 121, so F = 121 1 = 120. The possible orders are the divisors of 120. Solution: The

Διαβάστε περισσότερα

Second Order Partial Differential Equations

Second Order Partial Differential Equations Chapter 7 Second Order Partial Differential Equations 7.1 Introduction A second order linear PDE in two independent variables (x, y Ω can be written as A(x, y u x + B(x, y u xy + C(x, y u u u + D(x, y

Διαβάστε περισσότερα

6.3 Forecasting ARMA processes

6.3 Forecasting ARMA processes 122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear

Διαβάστε περισσότερα

About these lecture notes. Simply Typed λ-calculus. Types

About these lecture notes. Simply Typed λ-calculus. Types About these lecture notes Simply Typed λ-calculus Akim Demaille akim@lrde.epita.fr EPITA École Pour l Informatique et les Techniques Avancées Many of these slides are largely inspired from Andrew D. Ker

Διαβάστε περισσότερα

Partition of weighted sets (problems with numbers)

Partition of weighted sets (problems with numbers) TOPICS IN ALGORITHMS http://eclass.aueb.gr/courses/inf7/ Spring 27 I. ΜILIS Partition of weighted sets (problems with numbers) AUEB / DoI / TOPICS IN ALGORITHMS / Spring 27 / I. MILIS / 6 - PARTITIONS

Διαβάστε περισσότερα

[1] P Q. Fig. 3.1

[1] P Q. Fig. 3.1 1 (a) Define resistance....... [1] (b) The smallest conductor within a computer processing chip can be represented as a rectangular block that is one atom high, four atoms wide and twenty atoms long. One

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011 Διάρκεια Διαγωνισμού: 3 ώρες Απαντήστε όλες τις ερωτήσεις Μέγιστο Βάρος (20 Μονάδες) Δίνεται ένα σύνολο από N σφαιρίδια τα οποία δεν έχουν όλα το ίδιο βάρος μεταξύ τους και ένα κουτί που αντέχει μέχρι

Διαβάστε περισσότερα

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής Να γραφεί πρόγραμμα το οποίο δέχεται ως είσοδο μια ακολουθία S από n (n 40) ακέραιους αριθμούς και επιστρέφει ως έξοδο δύο ακολουθίες από θετικούς ακέραιους

Διαβάστε περισσότερα

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

6.1. Dirac Equation. Hamiltonian. Dirac Eq. 6.1. Dirac Equation Ref: M.Kaku, Quantum Field Theory, Oxford Univ Press (1993) η μν = η μν = diag(1, -1, -1, -1) p 0 = p 0 p = p i = -p i p μ p μ = p 0 p 0 + p i p i = E c 2 - p 2 = (m c) 2 H = c p 2

Διαβάστε περισσότερα

SOME PROPERTIES OF FUZZY REAL NUMBERS

SOME PROPERTIES OF FUZZY REAL NUMBERS Sahand Communications in Mathematical Analysis (SCMA) Vol. 3 No. 1 (2016), 21-27 http://scma.maragheh.ac.ir SOME PROPERTIES OF FUZZY REAL NUMBERS BAYAZ DARABY 1 AND JAVAD JAFARI 2 Abstract. In the mathematical

Διαβάστε περισσότερα

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007 Οδηγίες: Να απαντηθούν όλες οι ερωτήσεις. Όλοι οι αριθμοί που αναφέρονται σε όλα τα ερωτήματα μικρότεροι του 10000 εκτός αν ορίζεται διαφορετικά στη διατύπωση του προβλήματος. Αν κάπου κάνετε κάποιες υποθέσεις

Διαβάστε περισσότερα

PARTIAL NOTES for 6.1 Trigonometric Identities

PARTIAL NOTES for 6.1 Trigonometric Identities PARTIAL NOTES for 6.1 Trigonometric Identities tanθ = sinθ cosθ cotθ = cosθ sinθ BASIC IDENTITIES cscθ = 1 sinθ secθ = 1 cosθ cotθ = 1 tanθ PYTHAGOREAN IDENTITIES sin θ + cos θ =1 tan θ +1= sec θ 1 + cot

Διαβάστε περισσότερα

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1 Conceptual Questions. State a Basic identity and then verify it. a) Identity: Solution: One identity is cscθ) = sinθ) Practice Exam b) Verification: Solution: Given the point of intersection x, y) of the

Διαβάστε περισσότερα

Theorem 8 Let φ be the most powerful size α test of H

Theorem 8 Let φ be the most powerful size α test of H Testing composite hypotheses Θ = Θ 0 Θ c 0 H 0 : θ Θ 0 H 1 : θ Θ c 0 Definition 16 A test φ is a uniformly most powerful (UMP) level α test for H 0 vs. H 1 if φ has level α and for any other level α test

Διαβάστε περισσότερα

Math221: HW# 1 solutions

Math221: HW# 1 solutions Math: HW# solutions Andy Royston October, 5 7.5.7, 3 rd Ed. We have a n = b n = a = fxdx = xdx =, x cos nxdx = x sin nx n sin nxdx n = cos nx n = n n, x sin nxdx = x cos nx n + cos nxdx n cos n = + sin

Διαβάστε περισσότερα

Numerical Analysis FMN011

Numerical Analysis FMN011 Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12 Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) =

Διαβάστε περισσότερα

Lecture 21: Properties and robustness of LSE

Lecture 21: Properties and robustness of LSE Lecture 21: Properties and robustness of LSE BLUE: Robustness of LSE against normality We now study properties of l τ β and σ 2 under assumption A2, i.e., without the normality assumption on ε. From Theorem

Διαβάστε περισσότερα

Solution Series 9. i=1 x i and i=1 x i.

Solution Series 9. i=1 x i and i=1 x i. Lecturer: Prof. Dr. Mete SONER Coordinator: Yilin WANG Solution Series 9 Q1. Let α, β >, the p.d.f. of a beta distribution with parameters α and β is { Γ(α+β) Γ(α)Γ(β) f(x α, β) xα 1 (1 x) β 1 for < x

Διαβάστε περισσότερα

Solutions to Exercise Sheet 5

Solutions to Exercise Sheet 5 Solutions to Eercise Sheet 5 jacques@ucsd.edu. Let X and Y be random variables with joint pdf f(, y) = 3y( + y) where and y. Determine each of the following probabilities. Solutions. a. P (X ). b. P (X

Διαβάστε περισσότερα

A Hierarchy of Theta Bodies for Polynomial Systems

A Hierarchy of Theta Bodies for Polynomial Systems A Hierarchy of Theta Bodies for Polynomial Systems Rekha Thomas, U Washington, Seattle Joint work with João Gouveia (U Washington) Monique Laurent (CWI) Pablo Parrilo (MIT) The Theta Body of a Graph G

Διαβάστε περισσότερα

On a four-dimensional hyperbolic manifold with finite volume

On a four-dimensional hyperbolic manifold with finite volume BULETINUL ACADEMIEI DE ŞTIINŢE A REPUBLICII MOLDOVA. MATEMATICA Numbers 2(72) 3(73), 2013, Pages 80 89 ISSN 1024 7696 On a four-dimensional hyperbolic manifold with finite volume I.S.Gutsul Abstract. In

Διαβάστε περισσότερα

Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008

Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008 Sequent Calculi for the Modal µ-calculus over S5 Luca Alberucci, University of Berne Logic Colloquium Berne, July 4th 2008 Introduction Koz: Axiomatisation for the modal µ-calculus over K Axioms: All classical

Διαβάστε περισσότερα

MINIMAL CLOSED SETS AND MAXIMAL CLOSED SETS

MINIMAL CLOSED SETS AND MAXIMAL CLOSED SETS MINIMAL CLOSED SETS AND MAXIMAL CLOSED SETS FUMIE NAKAOKA AND NOBUYUKI ODA Received 20 December 2005; Revised 28 May 2006; Accepted 6 August 2006 Some properties of minimal closed sets and maximal closed

Διαβάστε περισσότερα

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Συστήματα Διαχείρισης Βάσεων Δεδομένων ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Συστήματα Διαχείρισης Βάσεων Δεδομένων Φροντιστήριο 9: Transactions - part 1 Δημήτρης Πλεξουσάκης Τμήμα Επιστήμης Υπολογιστών Tutorial on Undo, Redo and Undo/Redo

Διαβάστε περισσότερα

Lecture 15 - Root System Axiomatics

Lecture 15 - Root System Axiomatics Lecture 15 - Root System Axiomatics Nov 1, 01 In this lecture we examine root systems from an axiomatic point of view. 1 Reflections If v R n, then it determines a hyperplane, denoted P v, through the

Διαβάστε περισσότερα

5.4 The Poisson Distribution.

5.4 The Poisson Distribution. The worst thing you can do about a situation is nothing. Sr. O Shea Jackson 5.4 The Poisson Distribution. Description of the Poisson Distribution Discrete probability distribution. The random variable

Διαβάστε περισσότερα

the total number of electrons passing through the lamp.

the total number of electrons passing through the lamp. 1. A 12 V 36 W lamp is lit to normal brightness using a 12 V car battery of negligible internal resistance. The lamp is switched on for one hour (3600 s). For the time of 1 hour, calculate (i) the energy

Διαβάστε περισσότερα