### abstract data type

a description of operations on a data type that could have multiple possible implementations.

### ASCII

(pronounced "ask-key") an abbreviation of American Standard Code for Information Interchange, a character code that maps between 8-bit binary integers and characters such as letters, numbers, and punctuation. There are 256 possible ASCII codes, of which 95 are printable.

### Big O

an abstracted function that describes the amount of computer time or memory space required by an algorithm, as a function of problem size. For problems larger than a certain size, the actual time or space required will be less than the Big O multiplied by some constant.

### binary search

search of a binary tree or other structure, in which the size of the set to be searched is cut in half at each step.

### boxed number

a number that is defined as an object, so that it has a runtime type and methods that can be used, e.g. Integer in Java.

### branching factor

in a search tree, the number of children of a given node. Often, the branching factors of individual nodes will vary, so an average value may be used.

### circular queue

a queue implemented within an array, where the first element of the array logically follows the last element.

### cons

1. in Lisp, the function that constructs a pair of pointers, or basic element of list structure. 2. a cons data structure. 3. to make a cons data structure.

### constructive

describes a function that makes a new data structure but does not modify its arguments.

### depth-first search

a search in which children of a node are considered (recursively) before siblings are considered.

### divide and conquer

a problem-solving strategy in which a problem is broken down into sub-problems, until simple subproblems are reached.

### first-child/next-sibling

a way of implementing trees that uses two pointers per node but can represent an arbitrary number of children of a node.

### garbage

1. data that is incorrect, meaningless, or random; 2. storage that is no longer pointed to by any variable and therefore can no longer be accessed.

### grammar

a formal description of a language in terms of vocabulary and rules for writing phrases and sentences.

### immutable

describes a data structure that cannot be changed once it has been created, such as Integer or String in Java.

### inorder

an order of processing a tree in which the parent node is processed in between its children.

### interpreter

a program that reads instructions, determines what they say, and executes them. The CPU is an interpreter for machine language; the JVM is an interpreter for compiled Java bytecodes.

### intractable

a problem that is so hard (typically exponential) that it cannot be solved unless the problem is small.

### linear

O(n), a problem whose solution requires a linear amount of time or space if the problem is of size n.

### null dereference

a runtime error that occurs when an operation such as a method call is attempted on a null pointer.

### ontology

a description of the kinds of objects that exist in a computer program, e.g. a Java class hierarchy.

### operator

in a search tree, a program that changes a state into a child state, e.g. a move in a game.

### quadratic

O(n2), a problem whose solution requires a quadratic amount of time or space if the problem is of size n.

### queue

a data structure representing a sequence of items, which are removed in the same order as they were inserted.

### recursive case

a condition of the input data where the data will be handled by call(s) to the same program.

### reference type

a type in which variables of that type are pointers to objects. In the code Integer i = 3, the variable i holds a pointer to the Integer object that contains the value. In int j = 3, the variable j contains the value. In Java, only reference types have methods.

### runtime stack

a stack containing a stack frame of variable values for each active invocation of a procedure.

### sentinel

an extra record at the start or end of a data structure such as a linked list, to simplify the processing.

### set difference

given two sets, the set difference is the set of elements of the first set that are not members of the second set.

### side-effect

any effect of a procedure other than returning a value, e.g. printing or modifying a data structure.

### sort

to modify the order of a set of elements so that a desired ordering holds between them, e.g. alphabetic order.

### stack frame

a section of the runtime stack holding the values of all variables for one invocation of a procedure.

### tail recursive

a function whose value either does not involve a recursive call, or is exactly the value of a recursive call.

### Unicode

a character code that maps between binary numbers and the characters used in most modern languages, more than 110,000 characters. The lowest values of the UTF-8 encoding of Unicode are the same as ASCII, allowing characters to be 8 bits when staying within the ASCII character set. For other languages, more bits are used. Java uses Unicode.

### virtual machine

an abstract computer that is simulated by an interpreter program running on an actual computer.

### well-founded ordering

an ordering that can be guaranteed to terminate, e.g. starting at a positive integer and counting down to 0.

### word

a group of bits that are treated as a unit and processed in parallel by a computer CPU. Common word sizes are 32 bits and 64 bits.

### XML

eXtensible Markup Language, a way of writing data in a tree-structured form by enclosing items in pairs of opening and closing tags, e.g. <zipcode> 78712 </zipcode>

### A*

a heuristic search algorithm that attempts to find a desired goal using a heuristic function to estimate the distance from a given node to the goal.

### adjacency list

a representation of a graph in which each node has a list of nodes that are adjacent to it, i.e. connected to it by an arc.

### adjacency matrix

a representation of a graph in which a boolean matrix contains a 1 at position (i,j) iff there is an arc from node i to node j.

### B-tree

a tree with a high branching factor, to minimize the number of disk accesses required to access a desired record.

### Big O

an abstracted function that describes the amount of computer time or memory space required by an algorithm, as a function of problem size.

### binary heap

a data structure that implements a complete binary tree within an array, such that every parent node has a value that is less than the value of either of its children.

### branching factor

in a search tree, the number of children of a given node. Individual nodes will vary, so an average value may be used.

### comparison

the act of comparing two values to determine which is greater according to some ordering.

### cons

1. in Lisp, the function that constructs a pair of pointers, or basic element of list structure. 2. to make a cons data structure. 3. a cons data structure.

### critical path

in a PERT chart or scheduling graph, a path from the initial state to the goal such that any increase in time required along the critical path will increase the time to complete the whole project.

### dense graph

a graph such that a large fraction of possible connections among nodes are present, i.e. the number of edges is of the order of the number of vertices squared. cf. sparse graph.

### Dijkstra's algorithm

an optimal greedy algorithm to find the minimum distance and shortest path in a weighted graph from a give start node.

### discrete event simulation

a simulation in terms of events, in which the highest-priority (least time) event is removed from an event queue and executed, which may have the effect of scheduling future events.

### exclusive or

a binary Boolean function whose output is 1 if its inputs are different. Abbreviated XOR.

### garbage

storage that is no longer pointed to by any variable and therefore can no longer be accessed.

### geometric series

a series in which each successive term is multiplied by a constant less than 1, e.g. 1 + 1/2 + 1/4 + 1/8 + ...

### hash function

a function that is deterministic but randomizing, i.e. whose output is a relatively small integer that appears to be a random function of the key value.

### heuristic

a function that estimates the distance from a given node to the goal in A* search. More generally, a method that generally gives good advice about which direction to go or how to approach a problem.

### injective

describes a mapping in which each element of the domain maps to a single element of the range. Also, one-to-one.

### iterator

an object containing data and methods to iterate through a collection of data, allowing processing of one data item at a time.

### map

in MapReduce, a program that processes an element of the input and emits one or more (key, value) pairs.

### memory hierarchy

the use of several kinds of memory hardware in a computer system, where the fastest memory (e.g. cache) is smallest, slower memory (e.g. RAM) is larger, and the slowest memory (e.g. disk) is largest.

### memory locality

the processing of data in such a way that data that are located near each other by memory address are accessed nearby in time.

### minimum spanning tree

a tree formed from the nodes of a graph and a subset of its edges, such that all nodes are connected and the total cost of the edges is minimal.

### one-to-one

describes a mapping in which each element of the domain maps to a single element of the range. Also, injective.

### onto

describes a mapping in which each element of the range is the target of some element of the domain. Also, surjective.

### parsing

analysis of a sentence of a language to determine the elements of the sentence and their relationship and meaning.

### pattern

a representation of a class of objects, containing some constant elements in relation to variable elements.

### priority queue

a queue in which the highest-priority elements are removed first; within a priority value, the earliest arrival is removed first.

### randomized algorithm

an algorithm in which the data to be processed or the device to process it is randomly selected.

### Red-Black tree

a self-balancing binary tree in which nodes are "colored" red or black. The longest path from the root to a leaf is no more than twice the length of the shortest path.

### scalability

the ability of an algorithm or hardware system to grow to handle a larger number of inputs.

### set difference

given two sets, the set of elements of the first set that are not members of the second set.

### slack

in a PERT chart or scheduling graph, the amount of time by which the time of an activity could be increased without affecting the overall completion time.

### Splay tree

a self-balancing binary tree that places recently accessed elements near the top of the tree for fast access.

### stable

describes a sort algorithm in which the relative position of elements with equal keys is unchanged after sorting.

### surjective

describes a mapping in which each element of the range is the target of some element of the domain. Also, onto.

### symbol table

a data structure that links names to information about the objects denoted by the names.

### temporal locality

being close together in time, i.e. memory accesses that occur within a short time of each other.

### topological sort

a linear ordering of nodes of an acyclic graph, such that a node follows all of its graph predecessors in the ordering.

### tree rotation

changing the links in a binary tree to change the relative heights of the child subtrees, while leaving the sort order of the tree unchanged.

### unparsing

converting an abstract syntax tree into a sentence in a language, such as a programming language.

### XML

Extensible Markup Language, a way of writing data in a tree-structured form by enclosing it in tags.

### insertion sort

an O(n^2) search algorithm that's similar to the way people sort playing cards. Stable, in-place and on-line. First removes element from list, inserts it in the correct position, and repeats until finished.

### radix sort

an O(n*k) search algorithm where K = keylength. Stable. Sorts input into bins based on the lowest digit; then combines bins in order and sorts on the next highest digit & so forth.

### quick sort

O(n*log(n)) search algorithm; in-place, not stable. Picks a pivot, reorders so lesser objects are in front of pivot, recursively sorting sub-lists of lesser and sub-lists of greater values.

### merge sort

O(n*log(n)) search algorithm; stable, not in-place; breaks data in half, sorts, merges, repeats.

### When there is a straight line on a log-log graph, what does the slope represent?

The order of the polynomial

### What does it mean for a function to be intractable?

It can only be computed when n is relatively small (for example, exponential)

### When the ratio of times as the size of input is doubled is somewhat larger than 2, what is the Big O?

O( n*log(n) )

### How can you find the Big O of an if statement?

The max of the Big O of the test, then statement, and else statement

### What does it mean for something to be random access?

Access to any element has the same cost (for example, arrays)

### What is a pointer (aka reference)?

The memory address of the beginning of a record, or block of storage

### For reference types, what do == and != test?

The equality of pointer values (i.e. do they have the exact same data address in memory?)

### What are contents of a linked list?

Something as simple as a number, or a pointer to another linked list

### How does the constructing of a linked list work?

A linked list links new elements onto the front of the list.

### What does the function (cons item list) do?

It makes a new list element containing item, and adds it to the front of list

### In a Cons list, first and rest have different types. What are they?

First can be any Object type, while rest is a Cons or null

### With respect to linked lists, what does .set(idx, element) do?

Replaces the element at the specified position in this list with the specified element.

### With respect to linked lists, what does the function length produce?

The number of "things" in the linked list

### What is a "thing" concerning linked lists?

A simple item such as a number or string or a balanced pair of parenthesis and everything inside of them.

### What are base cases?

Simple inputs for which the answer is obvious and can be determined immediately.

### What does the function reverse do to a linked list?

It makes a new linked list whose elements are in reverse order of the original list

### What is a constructive function?

A function that creates a new list, but does not modify the original list's arguments

### What does it mean for functions to share structure?

The same list structure is part of more than one list.

### What is a destructive argument?

A function that creates a list but modifies the original list's arguments

### What does the function nconc do?

It concatenates two lists to form a single list; it does so by modifying the end of the first list to point to the second list

### What does the function member do?

It tests whether a given item is an element of a list. It returns the remainder of the list beginning with the desired element

### What does the function Union do?

It returns the set of elements that are members of either set (basically all elements with no duplicates)

### What is a circularly linked list?

The last link points back to the front of the list rather than to null or nil

### What does it mean to divide and conquer?

To break down a large problem into two smaller problems, until the problem becomes easy

### What does the function assoc do?

It provides a simple lookup tool to find information in a linked list

### What is an abstract data type?

a description of operations on a data type that could have multiple possible implementations.

### What is an association list?

It is a list of pairs, where each pair has a key, and a value associated with the key

### What does depth-first search do?

It searches children of a node before siblings are considered (through recursion)

### What is garbage?

it can be data that is incorrect, meaningless, or random, or storage that is no longer pointed to

### What is a runtime stack?

a stack that keeps a fresh set of values for each variable in a stack frame

### What is XML?

Extensible Markup Language, it allows users to put tags around their data to describe what the pieces of data mean

### What is a fair data structure?

An entry in a queue will eventually get serviced and removed so a queue is fair

### What will a filter function do?

Filter removes items from a Collection if they meet a certain condition

### What are the advantages to ArrayList?

get and set are O(1), and add and remove at the end are O(1) so it makes a good stack

### What are the advantages of LinkedList?

getFirst, addFirst, removeFirst, getLast, addLast, removeLast are all O(1)

### What are the different representations of trees that we are concerned with for Novak's class?

Binary trees, First-Child/Next-sibling, Linked lists, Implicit

### What is a First-Child / Next-Sibling Tree?

Down arrows represent the first child, while side arrows represent the next sibling

### What is inorder?

an order of processing a tree in which the parent node is processed in between its children

### What is the Big O

an abstract function that describes how fast a function grows as the size of the problem becomes large.

### What is the worst possible order of a function that we never want to see? Think of cancer and atomic bombs

Exponential

### What is the best way to make an Integer from an int value?

Integer myInteger = Integer.valueOf(myint);

### What are contents?

an element of a linked list. it could be a pointer or a value (like a number or string)

### Abstract Data Type

a description of operations on a data type that could have multiple possible implementations

### Boxed Number

a number that is defined as an object, so that it has a runtime type and methods that can be used, e.g. Integer in Java

### Divide and Conquer

a problem-solving strategy in which a problem is broken down into sub-problems, until simple subproblems are reached

### Immutable

describes a data structure that cannot be changed once it has been created, such as Integer or String in Java

### What does the function Nconc accomplish?

it concatenates two lists to form a single list; instead of copying the first list as append does, nconc modifies the end of the first list to point to the second list

### What does the function member accomplish?

member tests whether a given item is an element of the list

### Merge

to merge two sorted lists means to combine them into a single list so that the combined list is sorted.

### Divide and Conquer

a technique for solving a large problem by breaking it into two smaller problems, until the problem becomes easy

### What is a queue

a data structure that implements waiting in line: items are inserted (enqueued) at the end of the queue and removed (dequeued) from the front (FIFO)

### List the different representation of trees

Binary tree, First child/next sibling, linked list, implicit