In computer science, a charging argument is used to compare the output of an optimization algorithm to an optimal solution. It is typically used to show that an algorithm produces optimal results by proving the existence of a particular injective function. For profit maximization problems, the function can be any one-to-one mapping from elements of an optimal solution to elements of the algorithm's output. For cost minimization problems, the function can be any one-to-one mapping from elements of the algorithm's output to elements of an optimal solution.
In order for an algorithm to optimally solve a profit maximization problem, the algorithm must produce an output that has as much profit as the optimal solution for every possible input. Let |A(I)| denote the profit of the algorithm's output given an input I, and let |OPT(I)| denote the profit of an optimal solution for I. If an injective function h : OPT(I) → A(I) exists, it follows that |OPT(I)|≤|A(I)|. Since the optimal solution has the greatest profit attainable, this means that the output given by the algorithm is just as profitable as the optimal solution, and so the algorithm is optimal.
The correctness of the charging argument for a cost minimization problem is symmetric. If |A(I)| and |OPT(I)| denote the cost of the algorithm's output and optimal solution respectively, then the existence of an injective function h : A(I) → OPT(I) would mean that |A(I)|≤|OPT(I)|. Since the optimal solution has the lowest cost, and the cost of the algorithm is the same as the cost of the optimal solution of the minimization problem, then the algorithm also optimally solves the problem.
Charging arguments can also be used to show approximation results. In particular, it can be used to show that an algorithm is an n-approximation to an optimization problem. Instead of showing that an algorithm produces outputs with the same value of profit or cost as the optimal solution, show that it attains that value within a factor of n. Rather than proving the existence of a one-to-one function, the charging argument focuses on proving that an n-to-one function exists in order to prove approximation results.
Given a set of n intervals I = {I1, I2, ... , In}, where each interval Ii ∈ I has a starting time si and a finishing time fi, where si < fi, the goal is to find a maximal subset of mutually compatible intervals in I. Here, two intervals Ij and Ik are said to be compatible if they do not overlap, in that sj < fj ≤ sk < fk.
Consider the earliest finish time greedy algorithm, described as follows:
The interval scheduling problem can be viewed as a profit maximization problem, where the number of intervals in the mutually compatible subset is the profit. The charging argument can be used to show that the earliest finish time algorithm is optimal for the interval scheduling problem.
Given a set of intervals I = {I1, I2, ... , In}, let OPT(I) be any optimal solution of the interval scheduling problem, and let EFT(I) be the solution of the earliest finishing time algorithm. For any interval J ∈ OPT(I), define h(J) as the interval J' ∈ EFT(I) that intersects J with the earliest finishing time amongst all intervals in EFT(I) intersecting J. To show that the earliest finish time algorithm is optimal using the charging argument, h must be shown to be a one-to-one function mapping intervals in OPT(I) to those in EFT(I). Suppose J is an arbitrary interval in OPT(I).
Show that h is a function mapping OPT(I) to EFT(I).
Show that h is one-to-one.
Therefore, h is a one-to-one function mapping intervals in OPT(I) to those in EFT(I). By the charging argument, the earliest finishing time algorithm is optimal.
Consider the job interval scheduling problem, an NP-hard variant of the interval scheduling problem visited earlier. As before, the goal is to find a maximal subset of mutually compatible intervals in a given set of n intervals, I = {I1, I2, ... , In}. Each interval Ii ∈ I has a starting time si, a finishing time fi, and a job class ci. Here, two intervals Ij and Ik are said to be compatible if they do not overlap and have different classes.
Recall the earliest finishing time algorithm from the previous example. After modifying the definition of compatibility in the algorithm, the charging argument can be used to show that the earliest finish time algorithm is a 2-approximation algorithm for the job interval scheduling problem.
Let OPT(I) and EFT(I) denote the optimal solution and the solution produced by the earliest finishing time algorithm, as earlier defined. For any interval J ∈ OPT(I), define h as follows:
To show that the earliest finish time algorithm is a 2-approximation algorithm using the charging argument, h must be shown to be a two-to-one function mapping intervals in OPT(I) to those in EFT(I). Suppose J is an arbitrary interval in OPT(I).
Show that h is a function mapping OPT(I) to EFT(I).
Show that h is two-to-one.
Therefore, h maps no more than two distinct intervals in OPT(I) to the same interval in EFT(I), and so h is two-to-one. By the charging argument, the earliest finishing time algorithm is a two-approximation algorithm for the job interval scheduling problem.
In mathematics and computer science, an algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation. Algorithms are always unambiguous and are used as specifications for performing calculations, data processing, automated reasoning, and other tasks.
The travelling salesman problem asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?" It is an NP-hard problem in combinatorial optimization, important in theoretical computer science and operations research.
Linear programming is a method to achieve the best outcome in a mathematical model whose requirements are represented by linear relationships. Linear programming is a special case of mathematical programming.
A greedy algorithm is any algorithm that follows the problem-solving heuristic of making the locally optimal choice at each stage. In many problems, a greedy strategy does not usually produce an optimal solution, but nonetheless a greedy heuristic may yield locally optimal solutions that approximate a globally optimal solution in a reasonable amount of time.
Dynamic programming is both a mathematical optimization method and a computer programming method. The method was developed by Richard Bellman in the 1950s and has found applications in numerous fields, from aerospace engineering to economics.
In machine learning, the perceptron is an algorithm for supervised learning of binary classifiers. A binary classifier is a function which can decide whether or not an input, represented by a vector of numbers, belongs to some specific class. It is a type of linear classifier, i.e. a classification algorithm that makes its predictions based on a linear predictor function combining a set of weights with the feature vector.
In the bin packing problem, items of different volumes must be packed into a finite number of bins or containers each of a fixed given volume in a way that minimizes the number of bins used. In computational complexity theory, it is a combinatorial NP-hard problem. The decision problem is NP-complete.
In computer science, local search is a heuristic method for solving computationally hard optimization problems. Local search can be used on problems that can be formulated as finding a solution maximizing a criterion among a number of candidate solutions. Local search algorithms move from solution to solution in the space of candidate solutions by applying local changes, until a solution deemed optimal is found or a time bound is elapsed.
Combinatorial optimization is a subfield of mathematical optimization that is related to operations research, algorithm theory, and computational complexity theory. It has important applications in several fields, including artificial intelligence, machine learning, auction theory, software engineering, applied mathematics and theoretical computer science.
Multi-disciplinary design optimization (MDO) is a field of engineering that uses optimization methods to solve design problems incorporating a number of disciplines. It is also known as multidisciplinary system design optimization (MSDO).
In computability theory and computational complexity theory, a reduction is an algorithm for transforming one problem into another problem. A sufficiently efficient reduction from one problem to another may be used to show that the second problem is at least as difficult as the first.
In mathematics, a Markov decision process (MDP) is a discrete-time stochastic control process. It provides a mathematical framework for modeling decision making in situations where outcomes are partly random and partly under the control of a decision maker. MDPs are useful for studying optimization problems solved via dynamic programming and reinforcement learning. MDPs were known at least as early as the 1950s; a core body of research on Markov decision processes resulted from Ronald Howard's 1960 book, Dynamic Programming and Markov Processes. They are used in many disciplines, including robotics, automatic control, economics and manufacturing. The name of MDPs comes from the Russian mathematician Andrey Markov as they are an extension of Markov chains.
Interval scheduling is a class of problems in computer science, particularly in the area of algorithm design. The problems consider a set of tasks. Each task is represented by an interval describing the time in which it needs to be executed. For instance, task A might run from 2:00 to 5:00, task B might run from 4:00 to 10:00 and task C might run from 9:00 to 11:00. A subset of intervals is compatible if no two intervals overlap. For example, the subset {A,C} is compatible, as is the subset {B}; but neither {A,B} nor {B,C} are compatible subsets, because the corresponding intervals within each subset overlap.
In computer science, artificial intelligence, and mathematical optimization, a heuristic is a technique designed for solving a problem more quickly when classic methods are too slow, or for finding an approximate solution when classic methods fail to find any exact solution. This is achieved by trading optimality, completeness, accuracy, or precision for speed. In a way, it can be considered a shortcut.
In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running, or continue to run forever. Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist. For any program f that might determine if programs halt, a "pathological" program g called with an input can pass its own source and its input to f and then specifically do the opposite of what f predicts g will do. No f can exist that handles this case. A key part of the proof was a mathematical definition of a computer and program, which became known as a Turing machine; the halting problem is undecidable over Turing machines. Turing's proof is one of the first cases of decision problems to be concluded. The theoretical conclusion that it is not solvable is significant to practical computing efforts, defining a class of applications which no programming invention can possibly perform perfectly.
The activity selection problem is a combinatorial optimization problem concerning the selection of non-conflicting activities to perform within a given time frame, given a set of activities each marked by a start time (si) and finish time (fi). The problem is to select the maximum number of activities that can be performed by a single person or machine, assuming that a person can only work on a single activity at a time. The activity selection problem is also known as the Interval scheduling maximization problem (ISMP), which is a special type of the more general Interval Scheduling problem.
David Bernard Shmoys is a Professor in the School of Operations Research and Information Engineering and the Department of Computer Science at Cornell University. He obtained his Ph.D. from the University of California, Berkeley in 1984. His major focus has been in the design and analysis of algorithms for discrete optimization problems.
In computational geometry, a maximum disjoint set (MDS) is a largest set of non-overlapping geometric shapes selected from a given set of candidate shapes.
In computer science, an optimal binary search tree , sometimes called a weight-balanced binary tree, is a binary search tree which provides the smallest possible search time for a given sequence of accesses. Optimal BSTs are generally divided into two types: static and dynamic.
Truthful job scheduling is a mechanism design variant of the job shop scheduling problem from operations research.