36_Algorithms.txt 4/4/2010

Zhan and Noon tested algorithms for solving this problem, finding approximate or double bucket modifications to one algorithm and Pallattino's algorithm with two queues were fastest on actual data. Johnson's algorithm solves this problem in the sparse case faster than the cubic Floyd's algorithm, both of which solve this for all pairs. Another approach uses dynamic programming, and checks all edges n times; that algorithm also detects negative cost cycles, and is named for Bellman and Ford. A Fibonacci heap is used to speed up a greedy approach, which works only for positive-weight edges, while if an admissible heuristic is available, the A* algorithm can be used. For 10 points, identify this problem in graph theory, most famously solved by Dijkstra's algorithm, which asks for a fast route between two nodes. Answer: shortest path algorithms [accept with any of the following modifying the answer: all-pairs, single-source, or single-source single-destination]

Along with a binary search tree, one of these structures is used to store future beach-line-changing events in Fortune's algorithm for generating Voronoi diagrams. The ROAM algorithm uses a pair of these data structures to store triangles that can be either split or merged. A meldable heap is a version of this structure implemented using a binomial heap, which gives it a "merge" operation, and the “fringe” structure in the A* algorithm is one of these. They're used on network routing protocols to ensure real-time traffic is forwarded first, and they optionally implement the PeekAtNext operation. In Java these structures implement the "comparable" interface, unlike another structure whose interface they implement. For 10 points, name this data structure that unlike a related structure isn't first in first out but inserts each element with an associated value of importance. Answer: Priority queue (09Lederberg)

One of these algorithms should exhibit avalanching on all inputs and outputs, and examples include MD4, FNV, Linear Feedback Shift Register, and Cyclic Rendundancy Check. These algorithms can be divided into addative or multiplicative and rotative varieties based on whether they shift the accumulator as they traverse the input. The requirement of uniform distribution is often made more difficult by very non-uniform inputs, and a common problem is for a small set of input bits to cancel each other out. These algorithms are useful in the provision of digitial signatures, and to be used in cryptograhpy they typically must be one-way and collision-free. For 10 points, name these unary functions that return a key used in a namesake data type with Big O of one lookup time. Answer: Hash Function [accept simple Hash functions] (09Lederberg)

Fibonacci heaps are used in Johnson's Algorithm to determine this, and an efficient way to determine it via a best-first method is A* [A-STAR]. One variety of this class of algorithms runs in N cubed time in the size of the graph and is the all- pairs approach, which is slower than the Bellman-Ford algorithm of this type. The simplest algorithm for determining this involves a single source and a single destination with nonnegative edge weights and is named for Dijkstra. For 10 points, name this class of algorithms which determines the minimum sum of the weights between two nodes of a graph, exemplified by the quickest way to get between two cities given the time spent on roads between them. Answer: shortest-path algorithms [accept clear equivalents; prompt on €œgraph search€, €œtree search€, or anything else involving searching]

This type of algorithm is useful when the problem exhibits optimal substructure and when locally optimal choices lead to globally optimal solutions. Huffman coding, Dijkstra's (Dike-strahs) algorithm, and the fractional knapsack problem use it, although dynamic programming is a better solution to the "zero-one" knapsack problem. For ten points, what algorithm always makes the choice that looks best at the moment. Answer: greedy algorthm

It contains such public member functions as preorder, inorder, and postorder traversals, which call its own recursive utility functions to perform the appropriate operations on the internal representation. This nonlinear, two dimensional data structure picks a root value and orders subsequent values either to a right branch or left branch depending on that value's relation to the root. FTP, identify this ordering mechanism from computer science with an arboreal name.

1 36_Algorithms.txt 4/4/2010

Answer: binary tree

In 1999, McIlroy created an adversary for this algorithm that guarantees that it will run in worst-case time. Its worst- case runtime can be avoided by switching to after a certain recursion depth, a construction known as . Like mergesort, it is easily parallelizable, and its runtime can be decreased by first selecting the median of the unsorted input list. It was invented by C.A.R. Hoare, and its second phase is the partition function, which splits the original list into lists of elements that are greater or less than the chosen pivot value. For 10 points, identify this divide- and-conquer which runs in big O of n log n time, named for its speed. Answer:

The Deutsch-Bobrow algorithm implements a "deferred" variety of one technique used to perform this action in run- time, and one problem with that algorithm is the issue of zero count table overflow. Christopher's algorithm was created to perform this function for FORTRAN, while Lins' algorithm is a lazy algorithm which peforms this function using a control set. The Deutsch-Schorr-Waite algorithm is an example of a pointer-reversal algorithm for doing it. A two-phase algorithm to perform this action was developed by McCarthy and is known as mark-and-sweep, while Unix- based systems employ the reference-counting method. For ten points, identify this action in which memory that is no longer in use is returned to the heap. Answer: garbage collection

Applications of this type of data structure include parsing mathematical expressions and calling subroutines from parent programs, but NOT reading from an input stream or running processes in the order in which they were called. It can be implemented in order-one time in real life as a to-do box which is open at only one end, or in a program by a singly- linked list, since pushing and popping can all be done at the head. FTP, name this data structure which uses a last-in, first-out system. Answer: stack (prompt on "LIFO" or "last-in, first-out" on early buzz)

Performing one type of this process requires the use of a "burn-in," (*) and several adaptive or recursive methods named after it involve importance sampling. The error term in the "integration" named after it decreases as one over square root of N and bootstrapping yields estimates of parameters in another type of this process. Peter Lepage invented a version of this technique that applies to particle physics which involves constructing a separable multi- dimensional weight function. Including the VEGAS algorithm and simulated annealing approaches such as the Metropolis-Hastings algorithm, this type of technique includes is stochastic, contrasting it with deterministic algorithms such as molecular dynamics. For 10 points, give the general term for these methods of Markov Chain, integration, or sampling, which generally involves randomly selecting a whole bunch of points and is named for a European gambling mecca. Answer: Monte Carlo methods (accept "annealing" before *)

This man formulated a mechanism that checks whether a new state is safe or not when granting requests in the Banker's Algorithm. That algorithm was subsequently used in an early operating system he developed, known as the "T- H-E multiprogramming system". He also formulated a method that uses a stack to convert standard syntax into Reverse Polish Notation, the Shunting Yard Algorithm. With C. A. R. Hoare this man lends his name to a 1972 text book called Structured Programming that advocated his position against the GOTO statement. His extensive correspondences are collectively known as the "EWD" series, and one of his eponymous creations falls apart when graphs have negative edge weights and has a heuristic modification known as A Star. FTP, identify this computer scientist best known for lending his name to a greedy algorithm that finds the single source shortest path from a node in a graph. Answer: Edsger Wybe Dijkstra

A variant of this algorithm used for selection can be made to run in worst-case time by a median-of-three killer

2 36_Algorithms.txt 4/4/2010 sequence, though this algorithm can be used to find the smallest or largest few elements of an array effectively. In 1999, McIlroy created an adversary for this algorithm that guarantees that it will run in worst-case time, though a that finds an array's median will ensure a running time close to n log n. It works in three phases: choosing a pivot element, recursing on lesser elements, and recursing on elements greater than or equal to the pivot element. For 10 points, name this divide-and-conquer algorithm, noted for being faster than other n log n sorting algorithms in practice. Answer: Quicksort

Complexity class BPP problems are solved by these methods in polynomial time. Antithetic variates and control variates are common variance reduction techniques for its estimates, while low-discrepancy sequences are used in their "quasi" form. Lazzarini's choice of stopping time and needle lengths when attempting one named for Buffon gave an excessively accurate estimate of pi in just 3,408 tosses. The Gibbs sampler and the more general Metropolis-Hastings algorithm for calculating high-dimensional integrals, and random walk simulation of binomial options pricing models, are examples that make use of Markov chains. For 10 points, name these methods that can be converted into Las Vegas methods by continuing simulation until a sufficiently correct result is produced, named after a city in Monaco. Answer: Monte Carlo methods

One early method for this procedure was Fourier-Motzkin elimination, and the Hirsch conjecture provides an upper bound on the runtime of one method. Another method involves introducing slack variables and then manipulating the tableau through repeated pivoting. Karmarkar's algorithm and other interior point methods are among the fastest solutions, and the ellipsoid algorithm was the first polynomial time algorithm for it. The cutting-plane method can be used to solve the integer variety, which is NP-hard but which can sometimes be approximated by examining the dual. Originally developed by Kantorovich to optimize plywood production, FTP, name this problem, efficiently solved using the simplex method, which calls for the optimization of a linear objective function given linear constraints. Answer: linear programming

A variation of this algorithm which preserves the natural ordering does not perform a merge if an original node exists between two merged nodes and is named for Hu and Tucker. Faller, Gallagher, Knuth, and Vitter all worked on a modification to this algorithm which allowed it to operate in one pass, the so-called dynamic or adaptive form of it. The length limited version of this problem is reduced to the Coin-Collector problem in a generalization of it known as the Package-Merge Algorithm. It is more efficient than a similar technique named for Shannon and Fano, and the selection of the locally smallest two nodes at each step makes it a Greedy Algorithm. Using a binary tree to create prefix-free codes so that the most frequently used symbol has the smallest code, for 10 points, name this type of lossless data compression named for an MIT Computer Scientist. Answer: Huffman Coding

A more generalized version of this algorithm uses an admissible heuristic function that can result in a faster run time but requires more memory, and is known as A star. Unlike the Bellman-Ford algorithm that finds the same solution, this algorithm does not work with negative-weight edges. Its worst case run time of big O of n2 when using ordinary linked lists can be improved in sparse cases by the use of various heaps as a priority queue when running its central extract- min function. For 10 points, name this greedy algorithm that finds the shortest path tree for a given graph, named for its Dutch developer. Answer: Dijkstra's Algorithm

An extension of this statement was refined by Wilfried Sieg to include only boundedness, locality, and determinancy, and Steven Wolfram expanded it to systems in the natural world. Tibor Rado introduced a function for which it doesn't apply known as the busy beaver, and it could be challenged by the existence of an oracle. One version of it grew out of Hilbert's decision problem, while another formulation stated that real world numerical problems could be expressed using the lambda calculus. For 10 points, name this doubly eponymous principle that says every computable function

3 36_Algorithms.txt 4/4/2010 can be computed with one of its namesake's machines. Answer: Church-Turing thesis [accept in either order; prompt on a single name before "doubly"]

In the standard implementation of it, the worst case runtime occurs when the input data is already in the desired order. The recursive, partitioning nature of this algorithm makes it susceptible to boosts from parallelization. It can be optimized using in-place memory allocation to use only Big O of log n additional memory, and its worst case runtime can be avoided by picking a random element of the list to use when subdividing the list into smaller lists. FTP, identify this algorithm that operates by moving elements along a pivot that runs in big O of n log n time with a small constant, named for its speedy organization. Answer: Quicksort

The Tetris Algorithm can be used to perform a range query on the universal type of these data structures, which make use of a Z Order Curve. A function which compares only the first k bits of data can be used to implement the space- saving prefix type of these data structures, while the regular type places elements to the left and right of a median node during the split portion of data insertion. A. A. Toptsis developed a variant of this data structure which increased the density of certain components within it to two thirds from another variant's one half, the so called star variety. In that latter variant, records are only stored at the leaf level, that is, the plus variety of this data structure, which is used to implement the NTFS file system. Developed by Ed McCreight and Rudolf Bayer, it is a more generalized form of a 2-3 tree. For 10 points, name this data structure, a type of self-balancing tree often used to implement databases. Answer: B-Tree [or B Minus Tree]

In Perl, the efficiency of a method for this process can be improved with a Schwartzian transform, which grew out of the Lisp idiom of decorate, do this, undecorate. David Cohen and William Gates both wrote papers about a version of this process that cannot be done on a von Neumann machine in constant time, known as the pancake type, while Knuth shuffle is used in the purposefully bad bogo type. An algorithm for this task is stable if it preserves the order of two equal elements, and if the range of the input elements is known, the counting or bucket varieties can be used. For 10 points, bubble and quick also name types of what task of arranging elements in a given array? Answer: sorting

One of these which performs an important action only when writing data to disk is used in the Reiser4 file system and is known as a dancing one. The Day-Stout-Warren algorithm runs in linear time when operating on these objects, of which the radix variety is used to store sets of strings. The tasks of spatial searching and the storage of database information usually use the R and B varieties respectively, while types known as scapegoat, splay, red-black, and AVL are all self- balancing and binary. For ten points, identify these directed acyclic graphs, a type of data structure which consists of nodes that each have one parent and possibly many children. Answer: Trees (do not accept or prompt on binary tree)

These structures are used in solving the cycle detection problem because the solving algorithm halts on the second detection of the smallest value of a sequence. A slotted channel is used in an algorithm employing these structures in collision resolution, and they are also used in LRU page-management. They are used in a method of memory allocation contrasted with heap-based allocation, and to implement reverse Polish notation calculators. The SP and SS registers on the Intel x86 architecture are used to implement this data structure first proposed by Friedrich Bauer. Containing two basic operations for adding and removing data, push and pop, FTP, identify these last-in-first-out data structures. Answer: Stack

Encapsulation can be accomplished by use of the opaque variety of this structure and segmentation faults are generally caused by access of a non-physical address by one. These explicitly allow manipulation of their contents, the namesake type of arithmetic. Iterators are an extension of these that are subject, usually, to postfix operators and a simple singly linked list object contains variable storage and one of these to the same type of object. As these do not contain literals

4 36_Algorithms.txt 4/4/2010 but only the location of literals, they must be dereferenced before use, which is accomplished in C++ by the star operator. FTP, name these types of references that hold the memory address of something of interest, rather than the thing itself. Answer: pointers

One of the developers of this algorithm collaborated with Teller and Fermi on the first nuclear reactor. In chemistry, the First Reaction method is a dynamic type of this algorithm, and is used to model molecular behavior. One version of this technique is used to determine solutions for complex Ising models. Simulated annealing is a heuristic approach to global optimization using this method, and the Metropolis-Hastings algorithm is used to simulate a Markov Chain. A Las Vegas algorithm is a special case in which the outcome is always correct. FTP, name this type of algorithm, which refers to another center of gambling and which uses random numbers to solve problems, which is most notably attached to a method of numerical integration. Answer: Monte Carlo algorithms

This structure was invented in 1972 by Rudolph Bayer, and its height is no more than 2 lg (n+1) ["twice the base 2 log of n-plus-one"] if it contains n nodes. A similar structure created by Adelson-Velsky and Landis is a type of this and shares the property that it may require up to two rotations per insertion and can insert or delete in O (lg n) ["big-O of log n"] time. In it, no leaf may be more than twice as far from the root as any other, and every simple path from a node to a descendent contains the same number of nodes of the second namesake type. FTP, name this type of nearly-balanced tree, of which the AVL tree is a type, and each of whose nodes contain a bit indicating which of two "colors" the node is. Answer: red-black tree (or symmetric binary B-tree; prompt on "B-tree" or "tree")

Procedures of this type can provide polynomial time solutions to such problems as finding optimal places to insert line breaks in a body of text, finding the largest common substring of two strings, and the integer knapsack problem. They can provide vast improvements over exhaustive search algorithms by caching the answers to intermediate computations. FTP, name this type of algorithm that generally uses recurrence relations and the principle of optimality to solve optimization problems by first solving related subproblems, and which often works where greedy algorithms fail. Answer: dynamic algorithms (or dynamic programming, I suppose)

Invented by Tony Hoare in 1961, its advantages include its ability to operate in place and the velocity of its inner loop. Its effectiveness can be greatly increased by using various strategies to choose an efficient pivot. After a pivot is selected, all numbers less than the pivot are placed to the left, and all numbers larger than the pivot are placed to the right, with the algorithm then implemented recursively on the smaller lists. FTP, what is this computer science sorting algorithm named for its purported speed? Answer: quicksort

Its average time complexity is of the order n log(n). To execute it, arbitrarily choose an element x in the set. Split all other elements in the set into those greater than or equal to x and those less than x. Apply the same function recursively to the newly generated subsets until each subset has just one member. You have just performed, for 10 points, what sorting algorithm? Answer: Quicksort

The proto types of these are more lightweight because they do not contain a stack, while the break and squeeze operations are used in micro ones. Solutions to get around one of their problems can be found in Peterson's and Dekker's Algorithms, both of which are examples of (*) mutex algorithms. Functions that interact well of these, such as reentrant functions, are characterized by not returning static pointers and by protecting shared variables. In C, the posix type of them is usually used, and semaphores and locks help avoid race conditions and help synchronize them. For 10 points, name these programming constructs which allow for concurrently executing processes.

5 36_Algorithms.txt 4/4/2010

Answer: Execution Threads (or Threads of Execution) (09PB)

Tsakalidis represented these data structures as a BB-alpha tree, which allows one to find the ancestor relationship of elements in Big O of 1 time. Maurer’s Shadow Algorithm uses a dynamic version of one of these data structures to speed up simulations. CDR coding is a representation for these them in LISP, and multiple pieces of information are stored in each element in the (*) unrolled variant of them. Their ends may be demarcated by sentinel nodes, while circular ones have the final node point to the initial one. For 10 points, name these data structures which come in “singly” and “doubly” versions, whose nodes each contains a pointer to the next and/or previous node. Answer: linked lists (09PB)

Rodriguez-Rivera et al created one algorithm for doing this for Geodesic's Great Circle which is both non-moving and reduces fragmentation. Another method for doing this portions off half of the target at any one time and is known as Cheney's Algorithm. The generational type of this process relies on the infant mortality principle to focus on recently created objects. Incremental forms of this process have fewer performance repercussions than stop-the-world techniques, and several implementations use reference counting. A feature of managed languages, they help prevent bugs related to dangling pointers and can be implemented with a mark-and-sweep algorithm. For 10 points, name this process in computer science in which data no longer being used is reclaimed in memory. Answer: garbage collection

This algorithm is often paired with OAEP, which makes it probabilistic by adding random oracles. Now implemented via the PCKS scheme, modern versions use the Carmichael function. One pair of values generated have a product congruent to 1 modulo lambda of n. One step involves computing the totient of the product of two numbers and finding an integer that is coprime to that result. Another step in this algorithm is to find the modular multiplicative inverse of e, and the efficacy of this algorithm is proven by Fermat€™s Little Theorem. Its secure because of the difficulty in factoring large primes. For 10 points, name this public key encryption algorithm pioneered at MIT by the three scientists whose initials give it its name. Answer: RSA encryption [or Rivest, Shamir and Adleman]

One procedure that uses this technique calculates the target score of the second-batting team in an interrupted cricket match, while another is used for finding the maximum likely path in a Hidden Markov model. In addition to the Duckworth-Lewis method and the Viterbi algorithm, its also used to evaluate B-spline curves in De Boor's algorithm. The optimality condition for this procedure is given by Bellman's equation, and its more famously used in the Needleman- Wunsch sequence alignment algorithm and to find the longest common substring of a set of strings. This technique also relies on optimal substructure and recursion. FTP, name this programming technique that divides a problem into a set of subproblems. Answer: Dynamic Programming

The use of stacks to implement this was inaugurated by Edsger Dijkstra in his development of a complier for ALGOL 60 and is used in now almost all compiled languages. Though such efficient algorithms as BinarySearch and quicksort are usually written to use this, its use on most Von Neumann machines makes an algorithm's runtime and memory usage greater than those of an analogous algorithm utilizing only iteration. For ten points, name the feature that an algorithm that calls itself is said to utilize. Answer: recursion (prompt on "recursive")

This technique can be implemented by moving particles in each direction at a series of time steps by steps uniformly distributed between plus and minus square root quantity twice diffusion coefficient times time step to model diffusion. This technique can be used to estimate integrals, providing a value of volume times sampled average of integrand in the naive form. In this technique, that mean is obtained by integrating a uniform pdf to obtain a cdf, then summing over repeated evaluations of the integrand at points corresponding to the value for the cdf at a (*) random point drawn from

6 36_Algorithms.txt 4/4/2010 the unit interval. This technique can be made to converge faster by using reduction-of-variance techniques like importance sampling. For 10 points, name this class of algorithms that work by repeatedly generating random samples to use as inputs, named after a Monaco city and gambling mecca. Answer: Monte Carlo methods [prompt on stochastic methods or random methods] (TXTerrapin)

This is governed by the lambda calculus, and LISP uses the “tail” version of this to eliminate the need for extra space on the call stack. Programs using this can sometimes be sped up using memorization to store already-computed results or fully converted to iterative versions via dynamic programming. The Ackerman function is defined using this, and successively larger solutions to the Towers of Hanoi problem can be built with this. FTP, name this concept in computer science in which a function is defined in terms of a smaller instance of itself. Answer: recursion (08HFT)

A multikey version of this algorithm employs a three-way radix, and the introsort variant switches to heapsort when a bad case is encountered. In-place implementations of this algorithm requires only O (log n) [big oh of log n] space. Its quadratic worst case, which occurs when a single element is partitioned in each step, is much worse than a similar algorithm whose namesake operation joins two sorted sublists, mergesort, though both perform an average case of O (n log n) [big oh of n log n] comparisons. This algorithm's essential step picks a pivot element and places only smaller elements to the left of it. For 10 points, name this divide-and-conquer sorting algorithm developed by C. A. R. Hoare. Answer: quicksort (09HFT)

The use of this technique to solve optimization problems is evaluated by the Bellman equation and is known as dynamic programming. This programming technique has a tail form that can always be converted to loops. Functions that are effectively calculable by this process via the lambda calculus are the subject of the Church-Turing thesis. A method for finding the factorial of n uses this technique by multiplying n by the factorial of n - 1 until the function hits its base case. For 10 points, name this programming technique invoked when a function calls itself. Answer: recursion [accept word forms, accept dynamic programming before mention] (09HFT)

An algorithm that uses this data structure can be used to do a topological sort and has an iterative deepening form. Divide and conquer algorithms can be implemented iteratively using one of these, and the alternative to heap-based memory allocation is based on one of these. They are used to implement Reverse Polish notation calculations as well as the aforementioned (*) depth-first search, and their fundamental operations are push and pop. For 10 points, name this last-in, first-out data structure, in which adds and removes both occur on the “top.” Answer: stacks (HSAPQ3)

One algorithm of this kind partitions the input into buckets starting with the least significant digit. Besides the “radix” version, the most commonly implemented algorithm of this kind uses intelligent pivot selection to run in big o of n log n time for almost all inputs. Another fast algorithm for this task builds a min-heap and successively removes the root element. For 10 points, “selection,” “insertion,” “merge,” and “bubble” all name algorithms that accomplish this task, the arrangement of elements of a list in a specific order. Answer: sorting (HSAPQ4)

One condition with this name caused the destruction of the Flight 501 of the Ariane 5 launch system. In the x86 processor, the TEST instruction clears its namesake flag, and the DieHard allocator prevents the “heap” form of this from happening. “Trampolining” is a notable method of exploiting the stack buffer form of this phenomenon, and the arithmetic form of it excludes division by zero. Infinite recursion is a common cause of the stack form of this condition. For 10 points, name this term referring to crashes caused by an inundation of information or data. Answer: overflows (HSAPQ2)

This data structure has a variant for which many operations have constant amortized cost named for Fibonacci, and

7 36_Algorithms.txt 4/4/2010

dynamic memory allocation in the Java VM assigns new objects to an area of memory with this name. It can be rearranged to maintain its namesake property in log n time after its root node is removed, which makes it useful for implementing efficient priority queues. For ten points, name this data structure used in an efficient in-place sorting algorithm, a binary tree in which each node always has a higher or lower value than its children. Answer: heap (HSAPQ4)

A 1990 paper by M. J. Wiener showed that it could be made more efficient by using values like F0, F2, and F4, while PSS implementations are typically less favored over the PKCS#**15 implementation of it. Another way to implement this algorithm, discouraged by (*) ANSI X**31, sets the two highest and one lowest bits of a number, and increments by two until the Rabin-Miller test returns true. Its speed is increased with a quintuple storing information like the coefficient of the Chinese Remainder Theorem. Its key step computes an exponent, e, from the product of two large prime numbers. For 10 points, name this public-key encryption method, named for its three formulators. Answer: RSA Encryption [or Rivest-Shamir-Aldeman Encryption] (09PB)

One implementation of these data structures moves only items with a certain longer sequence, the "Robin Hood" method of its key step. Overlay Networks are often used to manage a variant of these, distributed structures which allow some (*) BitTorrent clients to operate without a tracker. These data structures, which can be implemented with open addressing, are prone to secondary clustering when quadratic probing is used in their key step. Bucketing and chaining are two approaches to handling collisions in these structures. For 10 points, name these data structures which can give Big O of 1 access time by using a namesake code for each entry. Answer: Hash Table [or Hash Map; prompt on Hash Function; do not accept "Hash Code"] (09PB)

One version of this statement made use of lambda definability, which is described as a function that can be calculated by a process of repeated substitution, and another was originally developed while attempting to prove that a posed problem for the predicate calculus was unsolvable. Copeland and Proudfoot wrote a controversial Scientific American article about it, in which they suggest the creation of an oracle. It says that the halting problem is undecidable, and though it may not be able to be proved, every realistic model discovered has proven to be equivalent. FTP name this thesis that says any effective computation can be translated into an equivalent computation by one of its namesake's eponymous machines. Answer: Church-Turing Thesis [accept in either order; prompt on only a single name]

This concept was recently attacked by Mendelson, who used analogous concepts like Tarski's theorem and Weierstrass' theorem. An example that gives credibility to this theory is Ackermann's function, which is mu-recursive but not primitive recursive. In addition to recursiveness, another property required by this theory is lambda-definability. Generally considered intrinsically unprovable, this thesis relies on the computability of a Turing machine. FTP, identify this thesis that states any function regarded naturally as computable can be computed by a suitable Turing machine Answer: Church-Turing thesis

The Deutsch-Bobrow algorithm implements a "deferred" variety of one technique used to perform this action in run- time, and one problem with that algorithm is the issue of zero count table overflow. Christopher's algorithm was created to perform this function for FORTRAN, while Lins' algorithm is a lazy algorithm which peforms this function using a control set. The Deutsch-Schorr-Waite algorithm is an example of a pointer-reversal algorithm for doing it. A two-phase algorithm to perform this action was developed by McCarthy and is known as mark-and-sweep, while Unix- based systems employ the reference-counting method. For ten points, identify this action in which memory that is no longer in use is returned to the heap. Answer: garbage collection (09Winter)

In November 2007, in an interview, Google CEO Eric Schmidt asked then-Senator Barack Obama a computer science question to which this is the correct answer. It dates back to 1887 to Herman Hollerith’s work on tabulating machines

8 36_Algorithms.txt 4/4/2010 for censuses, and an old IBM 80 series machine used to use it to sort punched cards at a rate of up to 2000 per minute. The most intuitive way to implement it starts from the most significant digit, but only the version starting from the least significant digit is a stable sort. For ten points, name this sorting algorithm, related to , which by knowing bounds on the range of its data is able to sort in linear time, and whose name is also a synonym for a number base. Answer: (08CC)

Swap functions are often used to avoid data corruption when using these, and some of these constructs can be classified as "basic" or "strong" by Abrahams Guarantees. The Eiffel language's design by contract approach to these does away with changes in control flow, and they are often implemented using C's longjump function. Some languages support these in a vectored rather than structured form, and checked ones appear in a method's signature and must be dealt with in calling methods. They provide clearer and more verbose descriptions than return codes, and can terminate a program when propagated completely up the call stack. Handled via catch blocks in Java, for 10 points, name these constructs including IndexOutOfBounds and NullPointer types. Answer: Exceptions (08CC)

Katajainen, Pasanen, and Teuhola developed an in-place variation of this algorithm using a selection tree, based on a version by Kronod that used constant additional space. A tiled version of this algorithm stops at a particular array size, and this algorithm uses Theta(n) auxiliary space unlike heapsort. Tim Peters developed an intelligent version of this algorithm which is used in Python, and using the Master Theorem on its governing recurrence relation shows that it has both average and worst-case runtime of big-O of n log n. This algorithm operates by halving the list, recursively applying itself, then using a namesake fusion operation. For 10 points, name this divide-and-conquer algorithm that competes with quicksort. Answer: (09EFT) kle and Hellman developed an algorithm for doing this through the use of the knapsack problem, which was improved on by Graham and Shamir to eliminate the problem of trapdoors. The Pohlig-Hellman algorithm for doing this task relies on exponentiation, while the Playfair algorithm, originally invented by Wheatstone, uses a 5 by 5 matrix to perform this task. Diffey and Hellman proposed a way of doing this through the use of public and private keys, while another way of accomplishing this task is with a substitution method such as the shifting method once employed by Julius Caesar. It can also be accomplished perfectly through the use of a random key stream in the one-time pad method, though perhaps the best known method for doing it is the RSA method. For ten points, identify this task which involved scrambling a message so that it can only be decoded by the intended receiver. Answer: encryption (accept cryptography, accept "public key cryptography", accept "public key exchange" due to ambiguities) (09EFT)

One potential issue with these objects can be obviated with the tortoise-and-hare algorithm or Floyd’s circle-finding algorithm, which is a linear-time procedure for finding loops. The amortized runtime for most operations on these structures can be reduced by building an array on each container, or by building-up from one of these a multi-level parallel series of them; those are the techniques of unrolling and skip creation. If the ends of these are protected with self-referential containers called sentinels, they are not prone to cause addressing faults, which usually result from moving past the end. Uni-directional iterators were created to work with these data structures, which are commonly implemented as objects containing a value and a pointer to an object of the same kind. For ten points, name these data structures idealized as series of chained nodes. Answer: linked lists (prompt on lists) (08IO)

Some types of hash tables use them to avoid collisions, and major disadvantages include a lack of serializability or caching. Its unrolled version carries an array of several data values within each node to ensure that more contiguous blocks of memory are used. CDR coding is used to implement them in LISP. Iterators are commonly used to read these sequentially, as they do not support fast random access, but insertion and deletion are both supported in constant time.

9 36_Algorithms.txt 4/4/2010

FTP, name this data structure that consists of a sequence of nodes, each containing references to the next or previous nodes. Answer: linked list (08HFT)

A Bellman equation is an condition associated with this technique, which is employed by the Cocke-Younger-Kasami algorithm that asks whether a string can be generated by a given context-free grammar. The Needlemna-Wunsch algorithm for nucleotide alignment also employs this technique, and this method is called stochastic if the immediate payoffs and the next state are known onyl as probabilities. An example of this method is modifying a recursive program to calculate the Fibonacci sequence so that the program stores each value of the sequence after calculating it and then reuses it if it is needed again instead of recalculating. For 10 points, name this method of problem solving, which aims to efficiently solve optimization problems which have overlapping sub-problems, and is often used to solve the traveling salesman problem and to check edit distance in spellcheckers. Answer: dynamic programming

When applied to charts, these programs can employ Earley's algorithm, and the CYK algorithm can be used to counter the local and global ambiguity problems these programs face. They can be created by programs such as Yacc, provided there is a valid Backus-Naur notation. When they employ a stack to push symbols through cycles of shifting followed by reduction, they are bottom up, and when they process input strings from left to right using leftmost derivations they are known as predictive or top-down. For 10 points, name these programs that typically map grammar symbols to data elements based on the rules of a particular grammar, and are present in compilers. Answer: parsers [or parsing; prompt on "compiler"]

In Java, the two reserved but unused keywords are const and this keyword. In C languages, its action is performed non- locally by the setjmp keyword. A 1968 letter by E. W. Dijkstra stated that this statement “should be abolished from all ‘higher level’ programming languages.” The title of that article was “[this keyword] considered harmful.” Usage of this statement can lead to disorganized “spaghetti code.” For 10 points, name this programming keyword that performs an unconditional jump to a specific label or line of code and whose inverse is the rarely-used parody, the “comefrom” statement. Answer: goto statement [accept unconditional jump before it is read; prompt jump before it is read] (09Fall)

Victims are special types of these that store entries that were removed from the general type of them. Ones with a no- write allocation policy do not need to worry about the decision to write-through or write-back. Misses in them include compulsory misses, which generally must occur on the first request, as well as conflict misses that result from an entry once in them having been evicted. In cases where data can be placed in exactly one place in them they are known as direct mapped, while the set associative type provides a compromise in locations between direct mapping and fully associative. FTP, identify this term which names a type of memory faster than the RAM accessed by the CPU, as well as for data your web browser stores locally on your hard drive. Answer: Cache (08Terrapin)

Fibonacci heaps are used in Johnson's Algorithm to determine this, and an efficient way to determine it via a best-first method is A* [A-STAR]. One variety of this class of algorithms runs in N cubed time in the size of the graph and is the all- pairs approach, which is slower than the Bellman-Ford algorithm of this type. The simplest algorithm for determining this involves a single source and a single destination with nonnegative edge weights and is named for Dijkstra. For 10 points, name this class of algorithms which determines the minimum sum of the weights between two nodes of a graph, exemplified by the quickest way to get between two cities given the time spent on roads between them. Answer: shortest-path algorithms [accept clear equivalents; prompt on “graph search”, “tree search”, or anything else involving searching] (09Fall)

Denali makes use of a process termed para this to run x86 architecture on certain machines advanced by Popek and

10 36_Algorithms.txt 4/4/2010

Goldberg. Examples of those machines described by this adjective include Java Runtime Environment, which sends commands and receives outputs from the Java software, and the memory of this type frees up RAM by moving unused physical memory to the hard disk. Certain entities described by this adjective are formed by reflections in all convex mirrors, and, when an object is within the focal length, converging lenses also lead to those images described by this adjective. For 10 points, identify this adjective, which contrasts with real images in optics and names a type of technology that simulates the feel of a fake alternate world called its namesake reality. Answer: virtual [accept word forms like virtualization] (09Fall)

A Bellman equation is an condition associated with this technique, which is employed by the Cocke-Younger-Kasami algorithm that asks whether a string can be generated by a given context-free grammar. The Needlemna-Wunsch algorithm for nucleotide alignment also employs this technique, and this method is called stochastic if the immediate payoffs and the next state are known onyl as probabilities. An example of this method is modifying a recursive program to calculate the Fibonacci sequence so that the program stores each value of the sequence after calculating it and then reuses it if it is needed again instead of recalculating. For 10 points, name this method of problem solving, which aims to efficiently solve optimization problems which have overlapping sub-problems, and is often used to solve the traveling salesman problem and to check edit distance in spellcheckers. Answer: dynamic programming (09Winter)

A dissimilarity characteristic for these objects is defined by Otter's theorem and is useful for analyzing Husimi ones. Rosa's conjecture concerns whether they may be gracefully labeled. The 2-3 version is a special variety of the B version of them. The zig, zig-zig, and zig-zag steps are used in creating the “splay” type of them, which uses much less memory than the AVL and red-black varieties. Kruskal and Prim name algorithms for finding their minimum spanning variety. For 10 points, name this class of graphs without double edges or cycles, which, in computer science, is a data structure that has a binary search variety, whose bottommost nodes are called leaves. Answer: trees (08Fall)

In 1999, McIlroy created an adversary for this algorithm that guarantees that it will run in worst-case time. Its worst- case runtime can be avoided by switching to heapsort after a certain recursion depth, a construction known as introsort. Like mergesort, it is easily parallelizable, and its runtime can be decreased by first selecting the median of the unsorted input list. It was invented by C.A.R. Hoare, and its second phase is the partition function, which splits the original list into lists of elements that are greater or less than the chosen pivot value. For 10 points, identify this divide- and-conquer sorting algorithm which runs in big O of n log n time, named for its speed. Answer: Quicksort (08Fall)

Terminator, Random, and Random XOR are the three types of “canaries” used to catch a common problem in them, and some programming languages allow for it to be unwound expliticly. Their counterpart is sometimes implemented using slabs or buddy blocks, and other languages implicitly unwind it when goto statements are used . Arbitrary executable code can be implemented with an exploit that preys on the return address stored in them, an exploit known as a buffer overflow. An unrelated construct of the same name can be combined with another data structure to form a deque [DECK], or double-ended queue, a data structure frequently employed in calculators using reverse Polish notation. The counterpart to the heap in memory allocation, FTP, give this term which also names a last-in-first-out data structure. Answer: Call stack (also accept Executable or Control or Run-Time Stack) (08Terrapin)

A less commonly used algorithm for calculating one of these is the reverse-delete algorithm, and David Karger gave a randomized, expected linear-time algorithm in 199*. Sollin is somewhat erroneously given credit for discovering an algorithm for finding them that does not optimize for components already added to a second graph. One commonly implemented method for finding one can be greatly improved by using an adjacency list or a Fibonacci Heap to bring the running time down to Big O of E plus V Log V, although the fastest known algorithm was developed by Bernard Chazelle. The first algorithm for finding one of these was discovered by Boruvka in 1926, but the two most famous ways to find

11 36_Algorithms.txt 4/4/2010 them involves using the greedy algorithms named for Kruskal and Prim. FTP, identify this non-cyclic subgraph that includes every vertex, connected by edges of the lowest total cost. Answer: (finding a) minimum spanning tree (08Terrapin)

This technique can be implemented by moving particles in each direction at a series of time steps by steps uniformly distributed between plus and minus square root quantity twice diffusion coefficient times time step to model diffusion. This technique can be used to estimate integrals, providing a value of volume times sampled average of integrand in the naive form. In this technique, that mean is obtained by integrating a uniform pdf to obtain a cdf, then summing over repeated evaluations of the integrand at points corresponding to the value for the cdf at a (*) random point drawn from the unit interval. This technique can be made to converge faster by using reduction-of-variance techniques like importance sampling. For 10 points, name this class of algorithms that work by repeatedly generating random samples to use as inputs, named after a Monaco city and gambling mecca. Answer: Monte Carlo methods [prompt on stochastic methods or random methods] (TXTerrapin)

This is governed by the lambda calculus, and LISP uses the “tail” version of this to eliminate the need for extra space on the call stack. Programs using this can sometimes be sped up using memorization to store already-computed results or fully converted to iterative versions via dynamic programming. The Ackerman function is defined using this, and successively larger solutions to the Towers of Hanoi problem can be built with this. FTP, name this concept in computer science in which a function is defined in terms of a smaller instance of itself. Answer: recursion (08HFT)

A multikey version of this algorithm employs a three-way radix, and the introsort variant switches to heapsort when a bad case is encountered. In-place implementations of this algorithm requires only O (log n) [big oh of log n] space. Its quadratic worst case, which occurs when a single element is partitioned in each step, is much worse than a similar algorithm whose namesake operation joins two sorted sublists, mergesort, though both perform an average case of O (n log n) [big oh of n log n] comparisons. This algorithm's essential step picks a pivot element and places only smaller elements to the left of it. For 10 points, name this divide-and-conquer sorting algorithm developed by C. A. R. Hoare. Answer: quicksort (09HFT)

The use of this technique to solve optimization problems is evaluated by the Bellman equation and is known as dynamic programming. This programming technique has a tail form that can always be converted to loops. Functions that are effectively calculable by this process via the lambda calculus are the subject of the Church-Turing thesis. A method for finding the factorial of n uses this technique by multiplying n by the factorial of n - 1 until the function hits its base case. For 10 points, name this programming technique invoked when a function calls itself. Answer: recursion [accept word forms, accept dynamic programming before mention] (09HFT)

An algorithm that uses this data structure can be used to do a topological sort and has an iterative deepening form. Divide and conquer algorithms can be implemented iteratively using one of these, and the alternative to heap-based memory allocation is based on one of these. They are used to implement Reverse Polish notation calculations as well as the aforementioned (*) depth-first search, and their fundamental operations are push and pop. For 10 points, name this last-in, first-out data structure, in which adds and removes both occur on the “top.” Answer: stacks (HSAPQ3)

One algorithm of this kind partitions the input into buckets starting with the least significant digit. Besides the “radix” version, the most commonly implemented algorithm of this kind uses intelligent pivot selection to run in big o of n log n time for almost all inputs. Another fast algorithm for this task builds a min-heap and successively removes the root element. For 10 points, “selection,” “insertion,” “merge,” and “bubble” all name algorithms that accomplish this task, the arrangement of elements of a list in a specific order. Answer: sorting (HSAPQ4)

12 36_Algorithms.txt 4/4/2010

One condition with this name caused the destruction of the Flight 501 of the Ariane 5 launch system. In the x86 processor, the TEST instruction clears its namesake flag, and the DieHard allocator prevents the “heap” form of this from happening. “Trampolining” is a notable method of exploiting the stack buffer form of this phenomenon, and the arithmetic form of it excludes division by zero. Infinite recursion is a common cause of the stack form of this condition. For 10 points, name this term referring to crashes caused by an inundation of information or data. Answer: overflows (HSAPQ2)

This data structure has a variant for which many operations have constant amortized cost named for Fibonacci, and dynamic memory allocation in the Java VM assigns new objects to an area of memory with this name. It can be rearranged to maintain its namesake property in log n time after its root node is removed, which makes it useful for implementing efficient priority queues. For ten points, name this data structure used in an efficient in-place sorting algorithm, a binary tree in which each node always has a higher or lower value than its children. Answer: heap (HSAPQ4)

Some types of hash tables use them to avoid collisions, and major disadvantages include a lack of serializability or caching. Its unrolled version carries an array of several data values within each node to ensure that more contiguous blocks of memory are used. CDR coding is used to implement them in LISP. Iterators are commonly used to read these sequentially, as they do not support fast random access, but insertion and deletion are both supported in constant time. FTP, name this data structure that consists of a sequence of nodes, each containing references to the next or previous nodes. Answer: linked list (08HFT)

This device is first used in Model 85 of the IBM System/360 product line. It is often used hierarchically, with architectures ranging from strictly inclusive to exclusive. They can range from fully associative over N-way associative to direct mapped, with the fully associative versions often smaller in size and direct mapped versions larger because of production cost issues. A benchmark of it is its miss rate, which is roughly inversely proportional with its size. Replacement of data can be least recently used for the direct mapped versions, but is often random for fully associative versions. Modern CPUs have several levels of it, ranging from L1, L2 to sometimes even L3, and it can be several MB in size. FTP, name this device used to store temporary data for faster write and retrieval. Answer: Cache (08CC)

In a strongly normalizing language, functions with this property would have infinitely long types. The "tail-" form of this property allows looping constructs and operations like GCD to be run in constant stack space. Definitions of this sort describe a tree as a structure whose leaves are trees and a Peano numeral as zero or the successor of a Peano numeral. The Ackermann function is a computable function that does not satisfy the "primitive" form of this property. FTP, identify this computer science concept, closely related to mathematical induction, that is often demonstrated with the Tower of Hanoi, the factorial function, or the Fibonacci series. Answer: recursive (accept word forms) (09EFT)

De Bruijn invented an alternative syntax for use in this system, and Sinot created director strings in order to find the complexity cost of beta reduction in this system. Rosser and one formulator of this system found a paradox proving the untyped version of this system to be inconsistent as a basis for logic, while Rosser and the other creator of this system showed that this system possesses confluence. The funarg problem can arise when implementing this system in stack- based languages, since such an implementation requires treating functions as first-class objects. Containing “abstractions” and “applications,” this system was shown to be Turing-complete. Implemented in functional programming languages such as Haskell and Lisp, for 10 points, name this formal system for representing functions, developed by Stephen Kleene and Alonzo Church and named for a Greek symbol. Answer: lambda calculus (08CC)

13 36_Algorithms.txt 4/4/2010

Baker’s method for doing this relies on maintaining a mutator invariant, which is guarded by page protection in the pseudo-real time algorithm for this named for Appel, Ellis, and Li. One form of this process is based on the concept of “infant mortality” and is known as the “generational” variety of this process. A form of this process that differentiates between “syntactic” and “semantic” forms of the objects being searched for remains insoluble due to the halting problem. One method for doing this is based on the “semispace” method developed by Fenichel and Yochelson and utilizes two equal halves of the heap in alternation; that method is Cheney’s algorithm. A variety of this process that halts all programs while running is called “stop-the-world,” and the simplest variety of this process puts a flag on every reachable object, and then deletes every unflagged object, called Mark and Sweep. For 10 points, name this process that is inlined in Java, but not in C or C++, the method of removing unused objects that will never be called again from memory. Answer: garbage collection [accept obvious syntactic equivalents] (09MO)

The Kleene-Rosser paradox in lambda calculus is resolved by invoking it, and operations utilizing its mu form may be computed by Turing machines. The Hofstadter Q-sequence uses this process, whose tail form can easily use less stack space by being transformed into iteration. A process for computing the greatest common divisor may be implemented using this, essential to the Ackermann function. For 10 points, identify this programming technique which reduces problems to base cases, commonly used for computing the terms of the Fibonacci sequence. Answer: recursion [accept word forms] (HSAPQ1)

The Rabin-Karp algorithm, useful for detecting plagiarism, employs a function of this data structure to increase the efficiency of string matching from quadratic to linear time. One issue associated with these structures occurs where changing a single bit can have disproportionately large changes in output known as the avalanche effect. Algorithms that are used to resolve common events associated with these structures include quadratic probing, separate chaining and Robin Hood; those events, called collisions, occur when two data elements are set to the same value. Distributed versions of these are essential features of P2P and BitTorrent services. For 10 points name this data structure that has an array, keys and an associated mapping function useful in improving the efficiencies of lookups and searches. Answer: hash table [prompt on hash] (CO08)

Belady’s MIN algorithm is the theoretically most efficient one used for these, however it is not practically implementable in hardware. Snooping and snarfing, as well as the Firefly and Dragon protocols are all used to maintain coherency in these structures. An important decision in their design is their write policy, which can be either write- through or write-back, and their replacement policy is often governed by a least recently used algorithm. FTP, what are these structures utilizing the concept of locality of reference, which, on CPUs, are often divided into a level 1 and a level 2? Answer: cache (pron. “cash”) (CO07)

A method for calculating a Euclidean type of one of these involves understanding of the properties of Delaunay triangulation. In the case of directed weighted edges, finding one of these is not sufficient and Edmond’s Algorithm should be used instead. The most efficient algorithm for calculating them was found by Bernard Chazelle, and has a runtime of approximately O(e) (“big-O of e”). The oldest algorithm for finding them was developed for an electricity network in Bohemia and is called Boruvka’s algorithm. Usually found using Kruskal’s or Prim’s algorithm, FTP name this type of subgraph, the smallest tree that connects all vertices of the graph together. Answer: minimum spanning tree (CO07)

(08HFT) One of them requires big-O of n-squared comparisons but only big-O of n swaps, and it’s a good idea to run one before running binary search. For ten points each – [10] Give the term for these algorithms. ANSWER: sorting algorithms

14 36_Algorithms.txt 4/4/2010

[10] In the k-th phase of this other big-O of n squared sort, the first k elements are in order, and then some of them are shifted over to make room for the k-plus-one-th element. ANSWER: [10] By comparing elements at larger intervals and swapping them quickly to distant locations, this variation on insertion sort operates much faster, running in n log-squared n time both in the worst case and on average. ANSWER: shell sort

(09HFT) One of these named for Ford and Fulkerson solves the max-flow problem, and pathfinding ones include A* [A- STAR]. For 10 points each: [10] Give this term that refers to a procedure a computer executes to solve a problem. ANSWER: algorithms [10] This class of algorithms makes the locally optimal choice at every point. An algorithm to solve the traveling salesman problem with this property would visit the nearest city at every step. Often these algorithms fail to find the globally best solution. ANSWER: greedy [10] This greedy algorithm named for a Dutch computer scientist produces a minimum spanning tree for a graph with nonnegative edge costs. ANSWER: Dijkstra's algorithm

(HSAPQ3) Name some constructs used in computer science, for 10 points each. [10] These data structures come in AVL and red-black types. The base node is the “root,” while nodes with no children are “leaves.” ANSWER: trees [10] Often used to implement priority queues, these structures are trees in which the root node always has either the minimum or maximum for some key. They are central to a type of sort. ANSWER: heaps [10] These constructs are used to traverse the elements of a collection in some arbitrary order. In Java, they are implemented using an interface with “next” and “has next” methods. ANSWER: iterators

(TXTerrapin) The earliest known algorithm to find them was proposed to create an efficient electrical network, since this object gives the least-cost set of edges reaching all nodes. For 10 points each: [10] Name this construct that can be found by the parallelizable Boruvka algorithm or simple Kruskal algorithm. ANSWER: minimum spanning tree [10] This minimum spanning tree-finding algorithm is in some sense the dual of Dijkstra’s algorithm in that it grows a tree starting with an arbitrary node and adding the remaining node with the minimum-weight edge until all nodes are added. On a Fibonacci heap, its time complexity is number of edges plus number of vertices log number of vertices. ANSWER: Prim's algorithm (accept Jarnik's algorithm or DJP algorithm) [10] Prim’s algorithm is an example of this general class of algorithms that always take the locally optimal step. ANSWER: greedy algorithms

(09Terrapin) Name some linear data structures, FTPE. [10] In simple terms, this is just any structure whose elements are accessed by indexing. Multi-dimensional ones use more than one index, dynamic ones can be resized, and a fast, sparse version of their associative form is named “Judy.” ANSWER: Arrays [10] These data structures can store multiple components in each cell, and feature a pointer to the next cell, except in the case of the last one, wherein the pointer is null. ANSWER: unrolled linked list (prompt on partials) [10] These structures work by taking a key and matching it with a certain value using their namesake function, used in arrays to locate the bucket.

15 36_Algorithms.txt 4/4/2010

ANSWER: hash tables

(09Terrapin) They can be used to find the minimum number of coins needed to make change. FTPE: [10] Identify these algorithms which construct a set of objects from the smallest possible constituents, typically using a form of recursion. Kruskal, Prim, and Dijkstra all name algorithms of this type, which proceed by making the most locally optimal choice at each level. ANSWER: Greedy algorithms [10] Greedy algorithms can be used to find this number expansion for any integer. Originally, they included any linear combination of six, nine, and twenty. ANSWER: McNugget numbers [10] This doubly-eponymous greedy algorithm generates its namesake sequence beginning with 1, 2, 4, 6, 9, 12, and *.Its reciprocal sum is conjectured to bound A-sequences, despite its sequence not being an A-sequence. ANSWER: Levine-O’Sullivan algorithm

(HSAPQ4) Like quicksort, it runs in Big O of n log n time. For 10 points each: [10] Name this sorting algorithm that recursively breaks a data set in half and then combines the two halves with its namesake operation. ANSWER: merge sort [10] Merge sort was first developed by this Hungarian, who worked on the EDVAC project, developed a namesake computer architecture, and was a co-founder of game theory. ANSWER: John von Neumann [10] Merge sort is one of these algorithms, characterized by non-overlapping subproblems. They work by recursively splitting a problem into smaller parts. ANSWER: divide-and-conquer algorithms

(HSAPQ2) This term describes a variable amount of memory accessed only during the runtime of the program. For 10 points each: [10] Give this term which is contrasted with static memory. ANSWER: dynamic memory [10] This process deletes all variables in a heap of dynamic memory that are not referenced by a pointer. ANSWER: garbage collection [10] This kind of variable is defined in all functions within a program, and so cannot be removed by garbage collection or any other means while the program is running. ANSWER: global variable

(HSAPQ1) 19. A “fast” version of this was developed by Tukey and Cooley. For 10 points each: [10] Name this special case of the Laplace transform in which the variable s is replaced with the imaginary variable i omega. ANSWER: Fourier transform [10] The fast Fourier transform is efficient in computing this type of Fourier transform, rather than the continuous form. This type of Fourier transform is a special case of Z transforms. ANSWER: discrete Fourier transform [10] The Fourier transform switches from the time domain to the domain of this other variable, denoted omega, which is measured in Hertz. ANSWER: frequency

(HSAPQ1) 4. Generally speaking, they are techniques for solving problems; frequently they operate by reducing a problem to subproblems. For 10 points each: [10] Identify the term frequently used in computer science to refer to procedures like those used for sorting lists or pathfinding. ANSWER: algorithms [10] This kind of algorithm selects the best possible immediate outcome at every possible step.

16 36_Algorithms.txt 4/4/2010

ANSWER: greedy [10] Another common abstract task for algorithms is traversing trees and graphs. This common greedy algorithm finds the shortest path from one graph vertex to another. ANSWER: Dijkstra

(CO09) It maps functions f and g to “the integral of f of x times g of the quantity u minus x dx.” For 10 points each: [10] Name this function that can be used to model blurring and echoes, a binary operation symbolized “f star g.” ANSWER: convolution [10] The circular convolution theorem uses this operation twice to perform a convolution. This specific type of operation, as opposed to a similar discrete operation, works in “big O of n log n” time. The discrete operation maps between frequency and time domains, while this operation provides both the discrete operation and its inverse. ANSWER: fast Fourier transform [prompt on “Fourier transform”] [10] This most common of the fast Fourier transforms utilizes the divide and conquer paradigm to compute the FFT. ANSWER: Cooley-Tukey algorithm

(07Nats) Answer the following about quantum computers, FTPE: [10] This most prevalent gate in a quantum computer, given two inputs, inverts the second qubit if and only if the first qubit is equal to ** Its truth table result is equivalent to XOR in a standard computer. ANSWER: Controlled-NOT gate or CNOT [10] This algorithm, one of the first to be designed for a quantum computer, uses the controlled-NOT gate and determines whether a function is balanced; i.e. it returns 1 for half its domain and 0 for the other half. ANSWER: Deutsch-Josza algorithm [10] This more famous algorithm was important to the development of quantum computation because it allowed for a way to factor large numbers in polynomial time. ANSWER: Shor’s algorithm

(08Nats) Name these sorting algorithms. FTPE. [10] This simple but incredibly inefficient n-squared algorithm compares two members of a list and swaps them if they are out of order. It continues comparing items until an entire pass has been made with no items in the list being swapped. ANSWER: [10] Invented by its namesake in 1959, this is the most efficient of the n-squared algorithms. It uses insertion sort to sort through i sets of n over i items, where i diminishes after each pass. ANSWER: Shell sort [10] A generalization of the pigeon hole principle, this algorithm can become impractical if the number of items to be sorted becomes too high. A count of the number of instances of each possible value in the set of data to be sorted is stored in the titular object for each possible value in the set. ANSWER: Bucket sort

(08Regs) Answer the following about a type of algorithm for 10 points each. [10] This kind of algorithm recursively breaks down a problem into sub-instances of the same problem, solves them, and then combines the multiple solutions into a single solution of the original problem. ANSWER: divide and conquer [10] This eponymous divide and conquer algorithm was one of the first implemented, described in a 1960 paper. It multiplies two n-digit numbers in time complexity big O of n raised to the log base 2 of ** ANSWER: Karatsuba's algorithm [10] This sorting algorithm is an example of a divide and conquer algorithm. It breaks down a list into smaller parts, sorts them, and joins the smaller lists back together. ANSWER: merge sort

17 36_Algorithms.txt 4/4/2010

(CO07) Name these sorting methods FTPE. [10] This method subdivides a list around a pivot element such that one half of the list contains elements less than or equal to the pivot, and the other sublist has the rest of the elements. The sorting method then runs itself on the sublists and combines the results to form a sorted list. ANSWER: Quicksort [10] Having least significant and most significant varieties, this sorting method sorts integers under an arbitrary but constant size in linear time by considering each individual digit. ANSWER: Radix sort [10] This sorting method developed by Ken Batcher is implemented using a and requires O(lg^2(N)) (“big-O of log squared of N”) passes. ANSWER: Odd-even mergesort

(09MO) Mutexes are often used to help avoid multiple instances of these reading or writing to the same data, a possibility that exists since they can be stopped or started at any point in their execution. For 10 points each: [10] Identify these constructs used in parallel programming, which tend to be lighter weight than processes. ANSWER: threads [10] When two threads are spawned from the same process, it's usually cheaper to perform this action between those threads than between threads from different processes. Task State Segments assist in doing this on the hardware level, and in general it involves exchanging the registers and other data of one thread for another. ANSWER: context switching [or task switching] [10] Formulated by Edsger Dijkstra, these objects are used to avoid race conditions and limit access to shared resources by using a non-negative integer as a counter. Unlike locks, they provide both ordering and mutual exclusion, and they solve the Dining Philosopher's problem. ANSWER: semaphores

(08MO) Identify the following things you might use to find shortest paths in graphs, for 10 points each. [10] This algorithm outputs a shortest-path tree for a graph as long as the graph only contains non-negative edge weights. It’s named after the inventor of semaphores, a Dutch computer scientist with a low opinion of GOTO statements. ANSWER: Dijkstra’s algorithm [10] This algorithm works by relaxing all the edges in every pass, rather than greedily selecting a node like Dijkstra’s does. As a result, this algorithm works for graphs with negative edge weights as well. ANSWER: Bellman-Ford algorithm [10] This algorithm is a modification of Dijkstra’s algorithm which includes a distance-to-the-goal-based heuristic. It was formulated by Hart, Nilsson, and Raphael. ANSWER: A* (A-star)

(08Regs) Examples of this data structure include the Dancing and Fusion types. For 10 points each: [10] Name this structure consisting of linked nodes, growing from the root node down to the leaf nodes. ANSWER: trees [10] This type of binary search tree, originally called a symmetric B tree, has empty leaf nodes and assigns each node one of the two namesake properties that govern many of its operations. ANSWER: red-black tree [10] This other type of self-balancing binary search tree can quickly look up recently accessed elements and uses its namesake operation to manipulate the tree such that the element of interest is at the root. ANSWER: splay tree

(CO09) Answer the following about Boolean satisfiability, for 10 points each.

18 36_Algorithms.txt 4/4/2010

[10] Boolean satisfiability was the first problem shown to belong to this complexity class, which also includes the knapsack problem and the travelling salesman. ANSWER: NP-Complete [10] This is the name of the theorem that states that Boolean satisfiability is an NP-complete problem. It is generally proved by showing that a tableau generated by a nondeterministic Turing machine can be verified in LOGSPACE. ANSWER: Cook-Levin Theorem [10] This computer scientist, in his paper "Reducibility among Combinatorial Problems" demonstrated the equivalence of 21 famous problems, including 0-1 integer programming, CLIQUE and 3-SAT, to Boolean satisfiability, thereby proving their NP-completeness. ANSWER: Richard Karp

(09PB) A "2-3" type of this data structure is a special case of the "B" one, which is often used in databases. For 10 points each: [10] Name this data structure consisting of nodes with one parent node and zero or more children nodes. ANSWER: trees (do not accept "Binary Tree" or "Binary Search Tree") [10] This self-balancing binary search tree, typically used in associative array implementation, carries out searches, insertions, and deletions in Big O of log n time. It has more flexible rules than the similar AVL Tree. ANSWER: red-black tree [10] The namesake operation of this other self-balancing tree is implemented with one of three steps—the zig, zig-zig or zig-zag. They're easier than Red-Black Trees to implement, and run in amortized Big O of log n for most operations. ANSWER: Splay Trees

(09PB) Stuff about some sorting algorithms you generally don't want to use in real life, for 10 points each. [10] This crappy algorithm with a Big O of n squared runtime operates by comparing neighboring elements in an array and swapping them if out of order. The smaller elements tend to quickly float to the start of the list. ANSWER: Bubble Sort [10] In practice this method is faster than Bubble Sort and operates by iterating through the array n times, at each stage choosing the smallest element in the unsorted array and swapping it with the element in the ith position. ANSWER: [10] Bubble Sort and Selection Sort are examples of this class of algorithms, which use a constant amount of additional memory to produce the output. That output usually overrides the input's location. ANSWER: In-Place Algorithms (or In Situ Algorithms)

(09PB) Identify some of these algorithms that run in Big O of n log n time, for 10 points each. [10] Although it has a worst case of Big O of n squared, this sorting algorithm achieves a speedy average running time of Big O of n log n by choosing a pivot and recursively sorting on elements smaller and greater than that pivot. ANSWER: Quicksort [10] One variant of this sorting method, proposed by Edsger Dijkstra, provided a better transition between its best case time of Big O of n and worst case of Big O of n log n, and was called Smooth Sort. It works by constantly removing the largest or smallest item from the namesake data structure. ANSWER: Heapsort [10] Performing one of these algorithms named for Cooley and Turkey can reduce the time needed to alter a function from Big O of N squared to Big O of N log N. More general ones rely on roots of unity to get around the need to perform a factorization of N. ANSWER: Fast Fourier Transform (or FFT)

(09PB) Algorithms for solving this problem include Ford-Fulkerson and Edmunds-Karp. For 10 points each: [10] Identify this problem in computer science, which given a source, a sink, and carrying capacities of edges, asks to find the extremum of a property of the graph. ANSWER: Maximum-flow minimum-cut problem [Accept minimum-cost maximum-flow] [10] One use of max flow is finding a maximum matching on this type of graph, where the nodes can be split into sets A

19 36_Algorithms.txt 4/4/2010

and B such that all edges go from a node in set A to a node in set B. ANSWER: Bipartite graph [10] When Ford-Fulkerson is used to solve the min-cost max-flow problem, this algorithm is used in one step. This doubly-eponymous shortest-path-finding algorithm works with negative edge weights, and runs in O(VE) time. ANSWER: Bellman-Ford

(09PB) Given a connected graph, this construct is the smallest-measure set of edges that connects every node of the graph. For 10 points each: [10] Name this graph theoretical construct that can be found with Sollin’s and Boruvka's algorithms. ANSWER: Minimum Spanning Tree (prompt on "spanning tree") [10] This other algorithm generates a minimum spanning tree for a weighted, undirected graph by starting with a single node, then repeatedly greedily adding nearby nodes via their minimum connecting edges. ANSWER: Prim’s algorithm (or Dijkstra-Jarník-Prim algorithm or Jarník algorithm or Prim-Jarník algorithm) [10] Prim’s algorithm can be improved by storing edges in a priority queue implemented with the Fibonacci type these data structures. The max ones are defined as trees in which each child has a key less than that of its parent. ANSWER: Heaps

(08IO) The naïve version of this algorithm is exponential in space, but only polynomial in time if its heuristic error is bounded by the logarithm of the optimal heuristic. For ten points each: [10] Name this best-first graph shortest-path algorithm posited by Hart, Nilsson, and Raphael. It traverses a priority queue of unvisited nodes known as the open set and examines each using a distance-plus-cost heuristic function. ANSWER: the A* (“a star”) algorithm [10] A* can be considered a generalization of this greedy shortest-path algorithm named for a Dutch computer scientist, which notably fails for graphs with negative edge weights. ANSWER: Djikstra’s algorithm [10] This structure invented by Fredman and Tarjan consists of a forest of parent-dominated trees having degrees given by namesake numbers. The use of this structure with Djikstra’s algorithm reduces its time complexity to big O of e plus v log v, where e and v and the edge and vertex numbers of a sparse graph. ANSWER: a Fibonacci heap (do not accept or prompt on “heap”)

(08IO) Bayer first described these structures as symmetric B-trees. For ten points each: [10] Identify these binary search trees that can insert in big O of log n time, where n is the node number, and which require nodes to have an alternating secondary property. ANSWER: red-black trees [10] Red-black trees are typically used to implement this type of structure, in which a set of unique keys is injectively mapped onto a set of values. These structures are also commonly implemented using hash tables. ANSWER: associative arrays (accept associative hashes or associative dictionaries; prompt on arrays or hashes or dictionaries) [10] Red-black trees and AVL trees have this property, which means their height is bounded by the ceiling of the binary logarithm of the number of nodes. Any tree with this property has logarithmic lookup, insertion, and removal. ANSWER: balance (accept self-balancing)

(09CC) Identify these data structures FTPE: [10] Often omitted when CS departments teach LISP, it allows constant-time read and write and is the only truly native one in C. ANSWER: Array [10] This structure that grows with inverse Ackerman's function is also used in Kruskal's algorithm and can be implemented as a forest. ANSWER: Disjoint Set (prompt on “Union-Find” or “Merge-Find”)

20 36_Algorithms.txt 4/4/2010

[10] This symmetric binary B-tree nightmare guarantees logarithmic insert, delete, and search in the worst case. ANSWER: Red-Black Tree

(09EFT) Microsoft’s website shows a solution for this problem with asynchronous agents. For 10 points each: [10] Name this problem in computer science which tries to figure out how to have people who don’t talk to each other eat using an insufficient amount of utensils in harmony. ANSWER: the dining philosophers problem [10] The dining philosophers problem was proposed by this computer snob whose namesake greedy algorithm finds the shortest path for some graphs. ANSWER: Edsger Wybe Dijkstra [10] Prim’s algorithm is similar to Dijkstra’s, except it attempts to find this construct, the shortest subgraph of a weighted graph which contains all its vertices. ANSWER: minimum spanning tree

(08Terrapin) Sorting algorithms! For ten points each! [10] This sorting method typically makes nlogn comparisons to sort n numbers, but has a worst case of making n- squared comparisons. It employs a ‘divide and conquer’ strategy by selecting a pivot value, placing all values greater above and all values less below, and then recursively sorting the sub-lists of lesser and greater elements. ANSWER: quick sort [10] Generally slower than quick sort, this algorithm features the benefit of an nlogn worst case implementation. It functions by extracting the largest or smallest value from the data set, until none remain, placing them in order using two functions: insertion and root deletion. ANSWER: heap sort [10] Another nlogn algorithm, it employs the divide and conquer strategy by breaking a data down into smaller, easier to handle lists, sorting these, and then bringing the small lists back together to form a complete, sorted table. ANSWER: merge sort

(08Terrapin) Identify some commonly used computer science algorithms, FTPE: [10] Very useful for sorting information by relatively small integer values, this algorithm performs a bucket sort on each digit from most to least or least to most significant, depending on the particular version. ANSWER: Radix sort [10] The classic example of a greedy algorithm, this algorithm named for a Dutch scientist finds the shortest path for a graph by following the lowest cost path to an unvisited node from the current node. ANSWER: Dijkstra’s algorithm [10] Named for the MIT Ph.D. student who developed it, this lossless compression scheme based on the principle of entropy encoding stores each symbol and its frequency of appearance in a binary tree. ANSWER: Huffman coding

(08Terrapin) For ten points each, name these data structures: [10] This linear data structure is made up of nodes, which consist of a value and a pointer or reference to the next and/or previous node. ANSWER: linked list [10] This data structure is characterized by the order in which values are added, where the last value added is the first value taken out. ANSWER: stack [10] This data structure associates keys with values, where keys are transformed using a function into a number that is used as an index to locate the value it is associated with. ANSWER: hash table

(09Winter)It gets around the problem of computing on subsets by picking a rolling hash that involves a modulo

21 36_Algorithms.txt 4/4/2010

operation on a large prime. For ten points each: [10] Identify this doubly-eponymous algorithm, which runs in big-O of n time, where n is the length of the input. ANSWER: Rabin-Karp algorithm [10] The Rabin-Karp algorithm is generally inferior to the Boyer-Moore algorithm; both accomplish this task, which typically involves finding a target inside some text. ANSWER: pattern matching or string searching [10] Together with Morris and Pratt, this computer scientist gives his name to another string searching algorithm. His other contributions to the field include being the author of The Art of Computer Programming. ANSWER: Donald Ervin Knuth

(09Winter)Answer some questions about a data structure used in computing, for 10 points each. [10] This data structure consists of nodes which each have at most two children. One commonly used type is the red- black type. ANSWER: binary search tree [10] This type of self-balancing binary search tree has the property that the heights of two subtrees of a node differ by at most one. It is named after its two inventors. ANSWER: AVL tree [accept: Adelson-Velsky and Landis] [10] This type of binary search tree is like a red-black tree, but none of the left children may be colored red. That makes deletion and restructuring operations on these trees much easier. ANSWER: AA tree [accept: Arne Andersson]

(09Winter)Answer some questions about graph theory algorithms, for 10 points each. [10] This graph traversal method uses a queue in its iterative form, and unlike a Depth-First Search, it examines all nodes at a given distance from the starting node before moving on to the next level. ANSWER: Breadth-First Search [10] This algorithm finds a minimum spanning tree by adding the vertex closest to the current tree. A Fibonacci heap can be used to reduce the time required to run this algorith, which is more complicated than Kruskal's algorithm. ANSWER: Prim’s algorithm [10] Both Dijkstra's algorithm and the Bellman-Ford algorithm are used for finding this entity from some source vertex to a destination. Dijksta's algorithm handles the non-weighted cases while the Bellman-Ford algorithm handles weighted ones. ANSWER: shortest path (accept any equivalents to "path" as long as some form of "shortest" is given)

(08Terrapin) Those generated from the same process share such resources as the stack and the memory space, and they are typically generated in UNIX-like systems through the fork command. FTPE: [10] Identify these sub-processes which are run concurrently by the operating system by means of a scheduler. ANSWER: threads [10] A mutex, or mutual exclusion, is a special example of these structures which threads use to protect the resources they are currently using from other threads. They were invented by Edward Dijkstra and take their name from a similar device used on railroads. ANSWER: semaphores [10] If semaphores are not used properly, this situation may arise in which it is not clear which process will access which resources first. ANSWER: race condition

(09Fall) A breadth-first search of one of these structures looks at nodes adjacent to one another rather than searching through offspring first. For 10 points each: [10] Identify this data structure whose binary search variety contains only offspring with smaller keys to the left and larger keys to the right of any given parent node. ANSWER: node-based tree

22 36_Algorithms.txt 4/4/2010

[10] This type of tree is a subgraph linking all the vertices of a connected graph and having the smallest edge weights between vertices. ANSWER: minimum weight spanning tree [prompt on partial answer] [10] Named for its inventors, this type of self-balancing binary tree is capable of faster retrieval than red-black trees. For a tree of size n, this tree’s height is limited to **44 times the log of n. ANSWER: AVL tree [or Adelson-Velskii Landis tree]

(09Fall) The conversion of name- or position-based references to these is known as "swizzling". For 10 points each: [10] Identify these objects that reference data located elsewhere in memory. Attempts to dereference the null variety of them cause either namesake exceptions or segfaults, depending on the language being used. ANSWER: pointers [accept "null pointers" or "NullPointerException"] [10] When each node in one of these data structures contains an array of data elements, it is said to be "unrolled". More generally, they consist of a collection of nodes, each of which contains a data element and a pointer to the next node. ANSWER: linked list [prompt on list] [10] Linked lists are often used to implement this type of first-in first-out data structure that is often used in discrete event simulation. One of these is used in the A-star search algorithm to keep track of alternate paths. ANSWER: priority queue

(09Fall) In this algorithm, elements lower than the pivot are moved before the pivot, and elements greater are moved after it; then the process is repeated for each subgroup. For 10 points each: [10] Name this speedy algorithm developed by C.A.R. Hoare. ANSWER: Quicksort [10] In , this is the average running time of quicksort, many other sorting algorithms such as selection sort which has running time n-squared. ANSWER: n(logn) [10] This often-impractical sort looks at pairs of adjacent elements in a list and swaps them if they are in the wrong order. Its name comes from the fact that the smallest elements “float” to the top of the list. ANSWER: bubble sort

(TXTerrapin) Processes may contain these, but, unlike processes, these constructs can share state information. For 10 points each: [10] Name these programming constructs that are generally controlled by either a preemptive or cooperative scheduler. ANSWER: threads [10] Mutexes and other types of semaphores may be used as a solution to these issues that may arise when feedback is not properly propagated while threads or processes are trying to access the same data. ANSWER: race conditions [10] This problem centers on a race condition and can therefore be solved with semaphores. It asks whether is it possible to prevent resource starvation by making it so that the namesake people are never all in the eat state holding a single fork. ANSWER: the dining philosophers problem

(08HFT) Early programming languages that used it include Simula and Smalltalk. For ten points each: [10] This programming philosophy, in which methods and attributes are defined as members of a class, has more recently been the basis of Java and C++. ANSWER: object oriented programming (or OOP) [10] One feature of object-oriented programming is this creation of derived classes from parent classes, which pass down their methods and attributes.

23 36_Algorithms.txt 4/4/2010

ANSWER: inheritance [10] This practice involves disclosing only the publicly accessible interface of a class so that other classes can interact with it without knowing the details of its implementation. ANSWER: encapsulation (prompt on information hiding)

(08HFT) An efficient algorithm for pattern matching developed by Rabin and Karp performs this on substrings, then compares the resulting values for equality. For ten points each – [10] Identify this procedure, in which a function maps data to numerical values, which can then be easily stored or used as lookups into a table. ANSWER: hashing (or hash functions; or hash values; or hash tables) [10] Good hash functions minimize the number of these costly occurrences, where different inputs map to the same value. ANSWER: collisions [10] The best hashes are described by this adjective, indicating that they have no collisions since any two distinct inputs generate a distinct output. ANSWER: injective

(HSAPQ3) This programming paradigm allows for polymorphism, and it is used by creating class files that define the namesake constructs. For 10 points each: [10] Name this programming paradigm, abbreviated OOP, exemplified by Java and C++. ANSWER: object-oriented programming [10] Object-oriented programming lets new classes take the fields and methods of a parent class through this concept, which uses an is-a relation. ANSWER: inheritance [10] Getters and setters are used in OOP to implement this concept, which entails classes hiding design information from other classes in order to allow easy change of design implementation. ANSWER: encapsulation

(09PB) One method of constructing one of these is Chan’s algorithm, which uses a binary search, and in two dimensions these figures can be seen as an elastic band that contains all of a given set of points. For 10 points each: [10] Name this geometric construct, which is defined as the convex set with the smallest area that contains a given set of points. ANSWER: Convex Hull [or Convex Envelope] [10] The Kirkpatrik-Seidel algorithm for finding a convex hull relies on this technique, in which a function calls itself. This technique is also often used to implement the factorial function. ANSWER: Recursion [or Recursive Algorithm] [10] Preparata and Hong developed one of these types of algorithms for finding a convex hull. Other examples include the standard binary search algorithm, and they often have recurrence relations of the form T of n is less than or equal to x times T of n over x plus c times n. ANSWER: Divide and Conquer Algorithms [or Decrease and Conquer Algorithms)

(09PB) It prevents problems such as double-free bugs and is implemented in languages like C# and Java. For 10 points each: [10] Name this programming language feature which automatically cleans up allocated memory that is no longer being used. ANSWER: Garbage Collection (or word forms like Garbage Collector) [10] The traditional way for implementing this type of garbage collection is to set a low-order bit on all nodes that are directly reachable and in their descendents. All blocks without this bit set are then freed. ANSWER: Mark and Sweep Garbage Collection

24 36_Algorithms.txt 4/4/2010

[10] The counterpart to incremental garbage collection, this implementation does not allow new objects to be allocated during the process. It results in occasional periods of unresponsiveness in programs using it. ANSWER: Stop-The-World Garbage Collection

(09Winter) They commonly require transition tables depicting the various conditions under which transitions should be made. For 10 points each: [10] Identify these theoretical constructs, classified into acceptors and recognizers, which have enough memory to remember their own condition. ANSWER: finite state machine [or FSM; or finite state automaton] [10] This is the name for the procedure which takes a finite state machine and returns one with a minimum number of states, by moving through a series of equivalence partitions. ANSWER: Moore reduction procedure [accept equivalents] [10] Give a stack to a finite state machine, and it becomes a pushdown automaton. If that stack does not have to be last-in-first-out, then this construct is equivalent to one of these theoretical universal computers, named after a man who authored a certain thesis with Church. ANSWER: Turing machines

(09Winter)Universal ones can simulate any other one, and Conway's Game of Life is one of these, as was established after glider guns were found. For 10 points each: [10] Identify these machines that are given a transition function and an initial state, which then proceed to write or erase a symbol, move one space to the left or right, and change state. ANSWER: Turing machines [10] Undecidable over Turing machines is this problem, which asks one to determine whether a program of given form will terminate on a given finite input. ANSWER: halting problem [10] These functions are not computable by any Turing machine because they quantify the potentially huge resource limits required by the eponymous kind of Turing machine. ANSWER: busy beaver function

(08Fall) The general definition of this quality is synonymous with computability, and canonical uses of it include solving the Towers of Hanoi and computing factorials. For 10 points each: [10] Name this term given to functions that call themselves, often contrasted with iterative functions. ANSWER: recursive functions [accept recursivity, recursiveness, recursion, or other word forms] [10] This type of recursive function, in which the last operation of the function is a recursive call, can easily be converted into an equivalent iterative function. ANSWER: tail-end recursion [10] This function is the most prominent example of those that are generally recursive but not primitive recursive, and is noted for its incredibly fast rate of growth. It’s symbolized A(m,n). [a of m and n] ANSWER: Ackermann-Peter function

(CO08)They come in transparent and clocked varieties, and they are useful for storing a single bit of information. For ten points each: [10] Identify these simple electronic components that are named because of their two possible states. ANSWER: flip-flops (accept latches) [10] The simplest type of flip-flop, it possesses two inputs. When both inputs are 1, or high, the output is unstable as the device enters a race condition. ANSWER: SR flip-flop [10] An SR flip-flop may be constructed by crisscrossing two of these logic gates that return true only if both inputs are false.

25 36_Algorithms.txt 4/4/2010

ANSWER: NOR

26