Abstract
In this chapter, we show in an intuitive manner what an algorithm is and develop a way to measure the quality of algorithms. In particular, we consider some basic aspects of graph theoretic algorithms such as, for example, the problem of how to represent a graph. Moreover, we need a way to formulate the algorithms we deal with. We shall illustrate and study these concepts quite thoroughly using two specific examples, namely Euler tours and acyclic digraphs. At the end of the chapter we consider a class of apparently very difficult problems (the so-called NP-complete problems) which plays a central role in complexity theory; we will meet this type of problem over and over again in this book.
If to do were as easy as to know what were good to do…
William Shakespeare
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
It is probably because of this aspect of mechanical practicability that some people doubt if algorithms are really a part of mathematics. I think this is a misunderstanding: performing an algorithm in practice does not belong to mathematics, but development and analysis of algorithms—including the translation into a program—do. Like Lüneburg, I am of the opinion that treating a problem algorithmically means understanding it more thoroughly.
- 2.
In most cases, we will not require this property.
- 3.
We can check whether a graph is connected with the BFS technique presented in Sect. 3.3.
- 4.
- 5.
This statement refers only to the representation of graphs in algorithms in general. For each concrete algorithm, we still have to check whether this substitution makes sense. For example, we always get directed cycles by this approach.
- 6.
How difficult it really is to deal with such a distribution can be seen in the probabilistic analysis of the simplex algorithm, cf. [Bor87].
- 7.
We write \(\overline{p}\) for the negation of the logical variable p, p+q for the disjunction p or q, and pq for the conjunction p and q. The \(x'_{i}\) are called literals, the C i are clauses.
- 8.
We may solve an evaluation problem quite efficiently by repeated calls of the associated decision problem, if we use a binary search. But in general, we do not know how to find an optimal solution just from its value. However, in problems from graph theory, it is often sufficient to know that the value of an optimal solution can be determined polynomially. For example, for the TSP we would check in polynomial time whether there is an optimal solution not containing a given edge. In this way we can find an optimal tour by sequentially using the algorithm for the evaluation problem a linear number of times.
- 9.
To be formally correct, we would have to state how an instance of a problem is coded (so that the length of the input data could be measured) and what an algorithm is. This can be done by using the concept of a Turing machine introduced by [Tur36]. For detailed expositions of complexity theory, we refer to [GarJo79, LewPa81], and [Pap94].
- 10.
Note that no analogous certificate is known for the question whether a graph is not Hamiltonian.
- 11.
Thus, for NP as well as for Co-NP, we look at a kind of oracle which presents some (positive or negative) answer to us; and this answer has to be verifiable in polynomial time.
- 12.
Thus we can presumably read NP also as non-polynomial. However, one also finds the opposite conjecture P = NP (along with some incorrect attempts at proving this claim) and the suggestion that the problem might be undecidable.
References
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison Wesley, Reading (1974)
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: Data Structures and Algorithms. Addison Wesley, Reading (1983)
Arora, S., Barak, B.: Computational Complexity. A Modern Approach. Cambridge University Press, Cambridge (2009)
Bäbler, F.: Über eine spezielle Klasse Eulerscher Graphen. Comment. Math. Helv. 21, 81–100 (1953)
Bauer, F.L., Wössner, H.: Algorithmic Language and Program Development. Springer, Berlin (1982)
Biggs, N.L.: Algebraic Graph Theory, 2nd edn. Cambridge University Press, Cambridge (1993)
Book, R.V.: Relativizations of the P =? NP and other problems: developments in structural complexity theory. SIAM Rev. 36, 157–175 (1994)
Borgwardt, K.H.: The Simplex Method. A Probabilistic Analysis. Springer, Berlin (1987)
Burkard, R.E.: Efficiently solvable special cases of hard combinatorial optimization problems. Math. Program. 79, 55–69 (1997)
Burkard, R.E., Deineko, V.G., van Dal, R., van der Veen, J.A.A., Woeginger, G.J.: Well-solvable special cases of the traveling salesman problem: a survey. SIAM Rev. 40, 496–546 (1998)
Cameron, P.J., van Lint, J.H.: Designs, Graphs, Codes and Their Links. Cambridge University Press, Cambridge (1991)
Chartrand, G., White, A.T.: Randomly transversable graphs. Elem. Math. 25, 101–107 (1970)
Cook, S.A.: The complexity of theorem proving procedures. In: Proc. 3rd ACM Symp. on the Theory of Computing, pp. 151–158 (1971)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Cvetkovic, D.M., Doob, M., Sachs, H.: Spectra of Graphs. Academic Press, New York (1980)
Cvetkovic, D.M., Doob, M., Gutman, I., Torgasev, A.: Recent Results in the Theory of Graph Spectra. North Holland, New York (1987)
de Bruijn, N.G.: A combinatorial problem. Indag. Math. 8, 461–467 (1946)
Edmonds, J.: Paths, trees and flowers. Can. J. Math. 17, 449–467 (1965)
Etzion, T.: An algorithm for constructing m-ary de Bruijn sequences. J. Algorithms 7, 331–340 (1986)
Even, S.: Combinatorial Algorithms. Macmillan, New York (1973)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, New York (1979)
Golomb, S.W.: Shift Register Sequences. Holden-Day, San Francisco (1967)
Hierholzer, C.: Über die Möglichkeit, einen Linienzug ohne Wiederholung und ohne Unterbrechung zu umfahren. Math. Ann. 6, 30–32 (1873)
Hopcroft, J., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison Wesley, Reading (1979)
Jensen, K., Wirth, N.: PASCAL User Manual and Report, 3rd edn. Springer, New York (1985)
Jungnickel, D.: Finite Fields. B.I. Wissenschaftsverlag, Mannheim (1993)
Kahn, A.B.: Topological sorting of large networks. Commun. ACM 5, 558–562 (1962)
Karp, R.M.: Reducibility among combinatorial problems. In: Miller, R.E., Thatcher, J.W. (eds.) Complexity of Computer Computations, pp. 85–103. Plenum Press, New York (1972)
Khuller, S.: Design and Analysis of Algorithms: Course Notes. Dept. of Computer Science, University of Maryland
Korte, B., Vygen, J.: Combinatorial Optimization. Theory and Algorithms, 5th edn. Springer, Berlin (2012)
Lewis, H.R., Papadimitriou, C.H.: Elements of the Theory of Computation. Prentice Hall, Englewood Cliffs (1981)
Lüneburg, H.: Programmbeispiele aus Algebra, Zahlentheorie und Kombinatorik. Report, Universität Kaiserslautern (1982)
MacWilliams, F.J., Sloane, N.J.A.: The Theory of Error-Correcting Codes. North Holland, Amsterdam (1977)
Mehlhorn, K.: Data Structures and Algorithms. Springer, Berlin (1984)
Mohar, B., Poljak, S.: Eigenvalues in combinatorial optimization. In: Brualdi, R., Friedland, S., Klee, V. (eds.) Combinatorial and Graph-Theoretic Problems in Linear Algebra, pp. 107–151. Springer, New York (1993)
Nijenhuis, A., Wilf, H.S.: Combinatorial Algorithms, 2nd edn. Academic Press, New York (1978)
Ore, O.: A problem regarding the tracing of graphs. Elem. Math. 6, 49–53 (1951)
Papadimitriou, C.H.: Computational Complexity. Addison-Wesley, Reading (1994)
Papadimitriou, C.H., Steiglitz, K.: Combinatorial Optimization: Algorithms and Complexity. Prentice Hall, Englewood Cliffs (1982)
Ralston, A.: A new memoryless algorithm for de Bruijn sequences. J. Algorithms 2, 50–62 (1981)
Rueppel, R.: Analysis and Design of Stream Ciphers. Springer, New York (1986)
Schwenk, A.J., Wilson, R.: On the eigenvalues of a graph. In: Beineke, L., Wilson, R. (eds.) Selected Topics in Graph Theory, pp. 307–336. Academic Press, London (1978)
Sipser, K.: Introduction to the Theory of Computation, 2nd edn. Thompson, Boston (2006)
Syslo, M.M., Deo, N., Kowalik, J.S.: Discrete Optimization Algorithms. Prentice Hall, Englewood Cliffs (1983)
Turing, A.M.: On computable numbers, with an application to the Entscheidungsproblem. Proc. Lond. Math. Soc. 42, 230–265 (1936)
Wirth, N.: Algorithms + Data Structures = Programs. Prentice Hall, Englewood Cliffs (1976)
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Jungnickel, D. (2013). Algorithms and Complexity. In: Graphs, Networks and Algorithms. Algorithms and Computation in Mathematics, vol 5. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32278-5_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-32278-5_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32277-8
Online ISBN: 978-3-642-32278-5
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)