In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, in the area of
lambda calculus
In mathematical logic, the lambda calculus (also written as ''λ''-calculus) is a formal system for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using var ...
and
computation
A computation is any type of arithmetic or non-arithmetic calculation that is well-defined. Common examples of computation are mathematical equation solving and the execution of computer algorithms.
Mechanical or electronic devices (or, hist ...
, directors or director strings are a mechanism for keeping track of the
free variable
In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for f ...
s in a
term. Loosely speaking, they can be understood as a kind of
memoization
In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur ag ...
for free variables; that is, as an
optimization
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
technique for rapidly locating the free variables in a
term algebra
Term may refer to:
Language
*Terminology, context-specific nouns or compound words
**Technical term (or ''term of art''), used by specialists in a field
***Scientific terminology, used by scientists
*Term (argumentation), part of an argument in d ...
or in a lambda expression. Director strings were introduced by Kennaway and Sleep in 1982 and further developed by Sinot, Fernández and Mackie
[F.-R. Sinot, M. Fernández and I. Mackie. [ftp://nozdr.ru/biblio/kolxoz/Cs/CsLn/R/Rewriting%20Techniques%20and%20Applications,%2014%20conf.,%20RTA%202003(LNCS2706,%20Springer,%202003)(ISBN%203540402543)(526s)_CsLn_.pdf#page=57 Efficient Reductions with Director Strings]{{cbignore, bot=medic. In ''Proc. Rewriting Techniques and Applications''. Springer LNCS vol 2706, 2003] as a mechanism for understanding and controlling the
computational complexity
In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it. Particular focus is given to computation time (generally measured by the number of needed elementary operations ...
cost of
beta reduction
In mathematical logic, the lambda calculus (also written as ''λ''-calculus) is a formal system for expressing computation based on function abstraction and application using variable Name binding, binding and Substitution (algebra), substitution ...
.
Motivation
In beta reduction, one defines the value of the expression on the left to be that on the right:
:
or