Complexity Theory in Computer Science Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Complexity Theory in Computer Science Pdf Complexity theory in computer science pdf Continue Complexity is often used to describe an algorithm. One could hear something like my sorting algorithm working in n2n'2n2 time in complexity, it's written as O (n2)O (n'2)O (n2) and polynomial work time. Complexity is used to describe the use of resources in algorithms. In general, the resources of concern are time and space. The complexity of the algorithm's time is the number of steps it must take to complete. The cosmic complexity of the algorithm represents the amount of memory the algorithm needs to work. The complexity of the algorithm's time describes how many steps the algorithm should take with regard to input. If, for example, each of the nnn elements entered only works once, this algorithm will take time O'n)O(n)O(n). If, for example, the algorithm has to work on one input element (regardless of input size), it is a constant time, or O(1)O(1)O(1), the algorithm, because regardless of the size of the input, only one is done. If the algorithm performs nnn-operations for each of the nnn elements injected into the algorithm, then this algorithm is performed in time O'n2)O (n2). In the design and analysis of algorithms, there are three types of complexities that computer scientists think: the best case, the worst case, and the complexity of the average case. The best, worst and medium complexity complexity can describe the time and space this wiki will talk about in terms of the complexity of time, but the same concepts can be applied to the complexity of space. Let's say you sort a list of numbers. If your login list is already sorted, your algorithm probably has very little work to do - this can be considered the best case of input and will have a very fast opening time. Let's take the same sorting algorithm and give it a list of inputs that are completely backward, and each element is unsmeal. This can be considered the worst contribution and will have a very slow working time. Now say you have a random entrance that is somewhat orderly and somewhat disordered (middle entrance). This will take the average time to work. If you know something about your data, for example, if you have reason to expect that your list is usually mostly sorted, and so can count on your best case of time working, you can choose an algorithm with a great best case of working time, even if it has a terrible worst and average work time. Usually, however, programmers have to write algorithms that can efficiently process any input, so computer scientists are usually particularly concerned about the worst cases of time-working algorithms. Exploring the innate complexities of computational complexity, the Computational Complexity Theory focuses on classifying computational problems according to their use of resources, and how these classes meet each other. The computational problem is decided by the computer. The computational problem is solvable applying mathematical steps such as algorithm. The problem is considered inherently difficult if it requires significant resources, regardless of the algorithm used. Theory formalizes this intuition by introducing mathematical computational models to study these problems and quantify their computational complexity, i.e. the amount of resources needed to solve them, such as time and storage. Other complexity indicators are also used, such as the amount of communication (used in communication complexity), the number of gate in the chain (used in chain complexity) and the number of processors (used in parallel calculations). One of the roles of computational complexity theory is to determine practical limitations on what computers can and cannot do. The Problem P vs. NP, one of the seven challenges of the Millennium Prize, focuses on the field of computational complexity. Closely related areas in theoretical computer science are algorithm analysis and computer theory. The key difference between algorithm analysis and computational complexity theory is that the first is to analyze the amount of resources a particular algorithm needs to solve a problem, while the second asks a more general question about all possible algorithms that can be used to solve the same problem. Specifically, computational complexity theory tries to classify problems that may or may not be solved with properly limited resources. In turn, the introduction of restrictions on available resources distinguishes computational complexity from the theory of computing: the last theory asks what problems in principle can be solved algorithmically. Computing Problems Travel seller tour through 14 German cities. Problematic instances of the Computing problem can be considered an endless collection of instances along with a solution for each instance. The input line for a computational problem is called an instance of a problem and should not be confused with the problem itself. In computational complexity theory, the problem refers to an abstract issue that needs to be addressed. On the contrary, an example of this problem is a rather specific statement that can contribute to the solution of the problem. For example, consider the problem of primary testing. A copy is a number (e.g. 15), and the solution is yes if the number is simple and no otherwise (in this case, 15 is not prime, and the answer is no). In other words, the instance is a special contribution to the problem, and the solution is an exit that corresponds to that input. To further emphasize the difference between the problem and the example, let's consider the following example of solving the version of the problem of the salesman: Is there a route of no more than 2,000 kilometers passing through all 15 major cities in Germany? The answer to this particular problem instance of little use to solve other cases of the problem, such as asking back and forth through all sites in Milan, the total length of which is no more than 10 km. For this reason, the theory of complexity eliminates computational problems, not individual problem instances. By presenting problematic instances when dealing with computational problems, a copy of the problem is a line above the alphabet. Typically, the alphabet is considered a binary alphabet (i.e. 0.1), and thus the strings are Beatstrings. As in a real computer, mathematical objects other than bitstrings must be properly encoded. For example, integers can be presented in binary notation, and graphs can be encoded directly through their adjaction matrix, or by encoding their adsjaction lists in binary. While some evidence of the complexity of the theorem regularly suggests some specific choice of input coding, one tries to keep the discussion abstract enough to be independent of coding choices. This can be achieved by effectively transforming different perceptions into each other. Problem solving as formal solutions problem languages has only two possible withdrawals, yes or no (or alternately 1 or 0) on any input. Decision-making problems are one of the central objects of research in the theory of computational complexity. The decision-making problem is a particular type of computational problem that is either yes or no, or alternately 1 or 0. The problem of decision-making can be seen as a formal language where members of the language are copies whose output is yes, and not members are those copies that are not. The goal is to decide using the algorithm whether the given input line is a member of the formal language under consideration. If the algorithm that solves this problem returns the answer yes, the algorithm is said to accept the input line, otherwise it is said to reject the input. The following is an example of a decision-making problem. Writing is an arbitrary schedule. The problem is whether or not to connect this schedule. The formal language associated with this decision-making problem is a set of all related graphs - to get an accurate definition of that language, you need to decide how graphs are encoded as binary lines. Function problem is a computational problem, where one output (common function) is expected for each input, but the solution is more difficult than a decision-making problem, meaning the solution is not just a yes or no. Notable examples include the salesman problem and the problem of factoring integrators. It is tempting to think that the concept of functional problems is much richer than the notion of decision-making problems. this is not actually the case, as feature issues can be overdosed as decision-making problems. Solutions. for example, the multiplication of two integrators can be expressed as a set of triples (a, b, c) so that × b q c. Deciding whether the triple member is a member of this set is consistent with the problem of multiplying two numbers. By measuring the size of an instance to measure the complexity of a computational problem, you can see how long it takes a better algorithm to solve a problem. However, the working time may usually depend on the instance. In particular, it will take longer to solve larger instances. Thus, the time it takes to solve a problem (or required space, or some degree of complexity) is calculated as a function of the size of the instance. It is commonly taken to be the size of the input in bits. Complexity theory is interested in how algorithms scale with the size of input. For example, in the problem of figuring out whether a graph is connected, how long does it take to solve a problem for a 2n vertices graph compared to time, a fade for a schedule with n vertices? If the size of the n input, the time can be expressed as a function n.
Recommended publications
  • Algorithms & Computational Complexity
    Computational Complexity O ΩΘ Russell Buehler January 5, 2015 2 Chapter 1 Preface What follows are my personal notes created during my undergraduate algorithms course and later an independent study under Professor Holliday as a graduate student. I am not a complexity theorist; I am a graduate student with some knowledge who is–alas–quite fallible. Accordingly, this text is made available as a convenient reference, set of notes, and summary, but without even the slightest hint of a guarantee that everything contained within is factual and correct. This said, if you find an error, I would much appreciate it if you let me know so that it can be corrected. 3 4 CHAPTER 1. PREFACE Contents 1 Preface 3 2 A Brief Review of Algorithms 1 2.1 Algorithm Analysis............................................1 2.1.1 O-notation............................................1 2.2 Common Structures............................................3 2.2.1 Graphs..............................................3 2.2.2 Trees...............................................4 2.2.3 Networks.............................................4 2.3 Algorithms................................................6 2.3.1 Greedy Algorithms........................................6 2.3.2 Dynamic Programming...................................... 10 2.3.3 Divide and Conquer....................................... 12 2.3.4 Network Flow.......................................... 15 2.4 Data Structures.............................................. 17 3 Deterministic Computation 19 3.1 O-Notation...............................................
    [Show full text]
  • LSPACE VS NP IS AS HARD AS P VS NP 1. Introduction in Complexity
    LSPACE VS NP IS AS HARD AS P VS NP FRANK VEGA Abstract. The P versus NP problem is a major unsolved problem in com- puter science. This consists in knowing the answer of the following question: Is P equal to NP? Another major complexity classes are LSPACE, PSPACE, ESPACE, E and EXP. Whether LSPACE = P is a fundamental question that it is as important as it is unresolved. We show if P = NP, then LSPACE = NP. Consequently, if LSPACE is not equal to NP, then P is not equal to NP. According to Lance Fortnow, it seems that LSPACE versus NP is easier to be proven. However, with this proof we show this problem is as hard as P versus NP. Moreover, we prove the complexity class P is not equal to PSPACE as a direct consequence of this result. Furthermore, we demonstrate if PSPACE is not equal to EXP, then P is not equal to NP. In addition, if E = ESPACE, then P is not equal to NP. 1. Introduction In complexity theory, a function problem is a computational problem where a single output is expected for every input, but the output is more complex than that of a decision problem [6]. A functional problem F is defined as a binary relation (x; y) 2 R over strings of an arbitrary alphabet Σ: R ⊂ Σ∗ × Σ∗: A Turing machine M solves F if for every input x such that there exists a y satisfying (x; y) 2 R, M produces one such y, that is M(x) = y [6].
    [Show full text]
  • Counting Below #P: Classes, Problems and Descriptive Complexity
    Msc Thesis Counting below #P : Classes, problems and descriptive complexity Angeliki Chalki µΠλ8 Graduate Program in Logic, Algorithms and Computation National and Kapodistrian University of Athens Supervised by Aris Pagourtzis Advisory Committee Dimitris Fotakis Aris Pagourtzis Stathis Zachos September 2016 Abstract In this thesis, we study counting classes that lie below #P . One approach, the most regular in Computational Complexity Theory, is the machine-based approach. Classes like #L, span-L [1], and T otP ,#PE [38] are defined establishing space and time restrictions on Turing machine's computational resources. A second approach is Descriptive Complexity's approach. It characterizes complexity classes by the type of logic needed to express the languages in them. Classes deriving from this viewpoint, like #FO [44], #RHΠ1 [16], #RΣ2 [44], are equivalent to #P , the class of AP - interriducible problems to #BIS, and some subclass of the problems owning an FPRAS respectively. A great objective of such an investigation is to gain an understanding of how “efficient counting" relates to these already defined classes. By “efficient counting" we mean counting solutions of a problem using a polynomial time algorithm or an FPRAS. Many other interesting properties of the classes considered and their problems have been examined. For example alternative definitions of counting classes using relation-based op- erators, and the computational difficulty of complete problems, since complete problems capture the difficulty of the corresponding class. Moreover, in Section 3.5 we define the log- space analog of the class T otP and explore how and to what extent results can be transferred from polynomial time to logarithmic space computation.
    [Show full text]
  • The Complexity of Counting Poset and Permutation Patterns
    AUSTRALASIAN JOURNAL OF COMBINATORICS Volume 64(1) (2016), Pages 154–165 The complexity of counting poset and permutation patterns Joshua Cooper Anna Kirkpatrick Mathematics Department University of South Carolina 1523 Greene St., Columbia, SC 29208 U.S.A. Abstract We introduce a notion of pattern occurrence that generalizes both clas- sical permutation patterns as well as poset containment. Many ques- tions about pattern statistics and avoidance generalize naturally to this setting, and we focus on functional complexity problems – particularly those that arise by constraining the order dimensions of the pattern and text posets. We show that counting the number of induced, injective occurrences among dimension-2 posets is #P-hard; enumerating the lin- ear extensions that occur in realizers of dimension-2 posets can be done in polynomial time, while for unconstrained dimension it is GI-complete; counting not necessarily induced, injective occurrences among dimension- 2posetsis#P-hard; counting injective or not necessarily injective occur- rences of an arbitrary pattern in a dimension-1 text is #P-hard, although it is in FP if the pattern poset is constrained to have bounded intrinsic width; and counting injective occurrences of a dimension-1 pattern in an arbitrary text is #P-hard, while it is in FP for bounded-dimension texts. This framework naturally leads to a number of open questions, chief among which are (1) is it #P-hard to count the number of oc- currences of a dimension-2 pattern in a dimension-1 text, and (2) is it #P-hard to count the number of permutations avoiding a given pattern? 1 Introduction A tremendous amount of study has been dedicated to understanding occurrence or non-occurrence of combinatorial substructures: which substructures are avoidable and counting objects that avoid them, what substructures random and random- like objects possess, enumerating substructures in general objects, describing the subclass of objects that have particular substructure counts, etc.
    [Show full text]
  • On Some Fine-Grained Questions in Algorithms and Complexity
    On some fine-grained questions in algorithms and complexity Virginia Vassilevska Williams Massachusetts Institute of Technology, EECS and CSAIL Abstract In recent years, a new “fine-grained” theory of computational hardness has been developed, based on “fine-grained reductions” that focus on exact running times for problems. Mimicking NP-hardness, the approach is to (1) select a key problem X that for some function t, is conjectured to not be solvable by any O(t(n)1−") time algorithm for " > 0, and (2) reduce X in a fine-grained way to many impor- tant problems, thus giving tight conditional time lower bounds for them. This approach has led to the discovery of many meaningful relationships between problems, and to equivalence classes. The main key problems used to base hardness on have been: the 3-SUM problem, the CNF-SAT problem (based on the Strong Exponential Time Hypothesis (SETH)) and the All Pairs Shortest Paths Problem. Research on SETH-based lower bounds has flourished in particular in recent years showing that the classical algorithms are optimal for problems such as Approximate Diameter, Edit Distance, Frechet Distance and Longest Common Subsequence. This paper surveys the current progress in this area, and highlights some exciting new developments. 1 Introduction Arguably the main goal of the theory of algorithms is to study the worst case time complexity of fundamental computational problems. When considering a problem P , we fix a computational model, such as a Random Access Machine (RAM) or a Turing machine (TM). Then we strive to develop an efficient algorithm that solves P and to prove that for a (hopefully slow growing) function t(n), the algorithm solves P on instances of size n in O(t(n)) time in that computational model.
    [Show full text]
  • The Computational Complexity of Games and Markets: an Introduction for Economists
    The Computational Complexity of Games and Markets: An Introduction for Economists Andrew McLennan∗ University of Queensland December 2011 Abstract This is an expository survey of recent results in computer science related to the computation of fixed points, with the central one beingthat the problemof finding an approximate Nash equilibrium of a bimatrix game is PPAD-complete. This means that this problem is, in a certain sense, as hard as any fixed point problem. Subsequently many other problems have been shown to be PPAD- complete, including finding Walrasian equilibria in certain simple exchange economies. We also comment on the scientific consequences of complexity as a barrier to equilibration, and other sorts of complexity, for our understanding of how markets operate. It is argued that trading in complex systems of markets should be analogized to games such as chess, go, bridge, and poker, in which the very best players are much better than all but a small number of competitors. These traders make positive rents, and their presence is a marker of complexity. Consequences for the efficient markets hypothesis are sketched. Running Title: Complexity of Games and Markets Journal of Economic Literature Classification Numbers G12 and G14. Keywords: Computational complexity, two person games, Nash equilibrium, Scarf algorithm, NP, TFNP, PPAD, FPTAS, Lemke-Howson algorithm, Walrasian equilibrium, arbitrage, asset trading, efficient market hypothesis. ∗School of Economics, Level 6 Colin Clark Building, University of Queensland, QLD 4072 Australia, [email protected]. McLennan’s work was funded in part by Australian Research Council grant DP0773324. I would like to gratefully acknowledge the comments received at Games Toulouse 2011, and at seminar pre- sentations at the Australian National University, the Institute for Social and Economic Research at Osaka University, and the Kyoto Institute for Economic Research.
    [Show full text]
  • Lipics-ITCS-2021-44.Pdf (0.6
    Total Functions in the Polynomial Hierarchy Robert Kleinberg Cornell University, Ithaca, NY, USA Oliver Korten Columbia University, New York, NY, USA Daniel Mitropolsky Columbia University, New York, NY, USA Christos Papadimitriou Columbia University, New York, NY, USA Abstract We identify several genres of search problems beyond NP for which existence of solutions is guaranteed. One class that seems especially rich in such problems is PEPP (for “polynomial empty pigeonhole principle”), which includes problems related to existence theorems proved through the union bound, such as finding a bit string that is far from all codewords, finding an explicit rigid matrix, as well as a problem we call Complexity, capturing Complexity Theory’s quest. When the union bound is generous, in that solutions constitute at least a polynomial fraction of the domain, we have a family of seemingly weaker classes α-PEPP, which are inside FPNP|poly. Higher in the hierarchy, we identify the constructive version of the Sauer-Shelah lemma and the appropriate generalization of PPP that contains it, as well as the problem of finding a king in a tournament (a vertex k such that all other vertices are defeated by k, or by somebody k defeated). 2012 ACM Subject Classification Theory of computation → Complexity classes Keywords and phrases total complexity, polynomial hierarchy, pigeonhole principle Digital Object Identifier 10.4230/LIPIcs.ITCS.2021.44 Funding Daniel Mitropolsky: This research was supported in part by a grant from the Columbia-IBM center for Blockchain and Data Transparency, and by JPMorgan Chase & Co. This research was supported in part by NSF Awards CCF1763970 andCCF1910700, and by a research contract with Softbank Christos Papadimitriou: This research was supported in part by NSF Awards CCF1763970 and- CCF1910700, and by a research contract with Softbank.
    [Show full text]
  • P Versus NP Frank Vega
    P versus NP Frank Vega To cite this version: Frank Vega. P versus NP. 2020. hal-02199310v14 HAL Id: hal-02199310 https://hal.archives-ouvertes.fr/hal-02199310v14 Preprint submitted on 28 Dec 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. P versus NP Frank Vega CopSonic, 1471 Route de Saint-Nauphary 82000 Montauban, France [email protected] Abstract P versus NP is considered as one of the most important open problems in computer science. This consists in knowing the answer of the following question: Is P equal to NP ? The precise statement of the P versus NP problem was introduced independently by Stephen Cook and Leonid Levin. Since that date, all efforts to find a proof for this problem have failed. Another major complexity class is P-Sel. P-Sel is the class of decision problems for which there is a polynomial time algorithm (called a selector) with the following property: Whenever it’s given two instances, a “yes” and a “no” instance, the algorithm can always decide which is the “yes” instance. It is known that if NP is contained in P-Sel, then P = NP .
    [Show full text]
  • Computational Complexity: from Patience to Precision and Beyond
    A Model-Independent Theory of Computational Complexity: From Patience to Precision and Beyond Ed Blakey The Queen's College, Oxford [email protected] Oxford University Computing Laboratory Wolfson Building, Parks Road, Oxford, OX1 3QD Submitted in Trinity Term, 2010 for the degree of Doctor of Philosophy in Computer Science Acknowledgements and Dedication We thank the author's supervisors, Dr Bob Coecke and Dr JoÄelOuaknine, for their continued support and suggestions during this DPhil project. We thank the author's Transfer/Con¯rmation of Status assessors, Prof. Samson Abramsky and Prof. Peter Jeavons, ¯rst for agreeing to act as assessors and secondly for their useful and for- mative comments about this project; we thank the author's Examiners, Prof. Peter Jeavons and Prof. John Tucker, for taking the time to act as such and for their valuable suggestions, of which some are incorporated here. We thank the organizers of Uncon- ventional Computing, the International Workshop on Natural Computing, Quantum Physics and Logic/Development of Computational Models, Science and Philosophy of Unconventional Computing and the International Conference on Systems Theory and Scienti¯c Computation for the opportunity (and, in the case of the last-mentioned con- ference, the kind invitation) to present work forming part of this project. We thank the participants of the above-mentioned conferences/workshops, as well as the British Colloquium for Theoretical Computer Science and Complexity Resources in Physical Computation, for their encouraging feedback and insightful discussion. We thank the reviewers of publications to which the author has contributed (including New Genera- tion Computing, the International Journal of Unconventional Computing and Natural Computing, as well as proceedings/publications associated with the conferences and workshops mentioned above) for their detailed comments and helpful suggestions; we thank also Prof.
    [Show full text]
  • The Equivalence of Sampling and Searching
    The Equivalence of Sampling and Searching Scott Aaronson∗ Abstract n In a sampling problem, we are given an input x ∈{0, 1} , and asked to sample approximately from a probability distribution Dx over poly (n)-bit strings. In a search problem, we are given n an input x ∈{0, 1} , and asked to find a member of a nonempty set Ax with high probability. (An example is finding a Nash equilibrium.) In this paper, we use tools from Kolmogorov complexity to show that sampling and search problems are “essentially equivalent.” More precisely, for any sampling problem S, there exists a search problem RS such that, if C is any “reasonable” complexity class, then RS is in the search version of C if and only if S is in the sampling version. What makes this nontrivial is that the same RS works for every C. As an application, we prove the surprising result that SampP = SampBQP if and only if FBPP = FBQP. In other words, classical computers can efficiently sample the output distribution of every quantum circuit, if and only if they can efficiently solve every search problem that quantum computers can solve. 1 Introduction The Extended Church-Turing Thesis (ECT) says that all computational problems that are feasibly solvable in the physical world are feasibly solvable by a probabilistic Turing machine. By now, there have been almost two decades of discussion about this thesis, and the challenge that quantum computing poses to it. This paper is about a related question that has attracted surprisingly little interest: namely, what exactly should we understand the ECT to state? When we say “all computational problems,” do we mean decision problems? promise problems? search problems? sampling problems? possibly other types of problems? Could the ECT hold for some of these types of problems but fail for others? Our main result is an equivalence between sampling and search problems: the ECT holds for one type of problem if and only if it holds for the other.
    [Show full text]
  • Going Meta on the Minimum Circuit Size Problem: How Hard Is It to Show How Hard Showing Hardness Is?
    Claremont Colleges Scholarship @ Claremont HMC Senior Theses HMC Student Scholarship 2021 Going Meta on the Minimum Circuit Size Problem: How Hard Is It to Show How Hard Showing Hardness Is? Zoë Bell Follow this and additional works at: https://scholarship.claremont.edu/hmc_theses Part of the Theory and Algorithms Commons Recommended Citation Bell, Zoë, "Going Meta on the Minimum Circuit Size Problem: How Hard Is It to Show How Hard Showing Hardness Is?" (2021). HMC Senior Theses. 250. https://scholarship.claremont.edu/hmc_theses/250 This Open Access Senior Thesis is brought to you for free and open access by the HMC Student Scholarship at Scholarship @ Claremont. It has been accepted for inclusion in HMC Senior Theses by an authorized administrator of Scholarship @ Claremont. For more information, please contact [email protected]. Going Meta on the Minimum Circuit Size Problem: How Hard Is It to Show How Hard Showing Hardness Is? Zoë Ruha Bell Nicholas Pippenger, Advisor Ran Libeskind-Hadas, Reader Department of Mathematics December, 2020 Copyright © 2020 Zoë Ruha Bell. The author grants Harvey Mudd College and the Claremont Colleges Library the nonexclusive right to make this work available for noncommercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author. Abstract The Minimum Circuit Size Problem (MCSP) is a problem with a long history in computational complexity theory which has recently experienced a resurgence in attention. MCSP takes as input the description of a Boolean function 5 as a truth table as well as a size parameter B, and outputs whether there is a circuit that computes 5 of size B.
    [Show full text]