CMSC420

¡Supera tus tareas y exámenes ahora con Quizwiz!

Priority Queue

A list from which elements are removed according to a predefined rank

Point Region Quadtree(K-ary trie)

An extended 4-ary tree and 4-way search trie. Internal nodes correspond to predefined partitions and serve as guides to the keys that are stored in the leaves. Internal nodes are gray nodes, and external nodes are black nodes. At most one key can occupy an internal nodes partition(child pointer). Internal nodes must have at least 2 non-empty quadrants. Quadrants are also closed on the bottom left and bottom

Double Hashing

Another method of probing by hashing the key twice to find the next key location in the probing sequence. f(i) = i x g(x).

Primary Clustering

Happens when the tables contains many keys with the same hash value(implying a poor hash function)

Linear probing

Search sequential locations until an open one is found. f(i) = i. As table gets full performance gets worse. This is due to clustering.

good hash function properties

Should be simple to compute with simple arithmetic. Should produce few collisions, by having these rules of thumb: should be a function of every bit of the key, and should break up the naturally occuring clusters of keys.

D-Heap

Similar to a binary heap except it is a complete or left complete d-ary tree (either max or min)

T(n) is in big-Theta(f(n))

T(n) is greater than or equal to a*f(n) and less than or equal to b*f(n) for all n greater than or equal to n2.

T(n) is in big-Omega(f(n))

T(n) is greater than or equal to b*f(n) for all n greater than or equal to n1.

T(n) is in O(f(n))

T(n) is less than or equal to a*f(n) for all n greater than or equal to n0.

Static Data Set

The number of keys and their values are known at runtime, and remain unchanged. You can have a fixed-sized data set, but allow key modification. Similarly you can fixed key-data values, but allow a varying amount of instantiations, thereby allowing a varied number of elements at runtime.

Quadratic probing

Use a non linear, f(i) = i^2, function to scatter keys more during probing. Helps to avoid secondary clustering.

sparse matrix

a 2d array where the number of non-zero entries is proportional to the row or column size, not the number of entries in the matrix. For a sparse nxn matrix, that means at most some positive constant cn of the n^2 total entries are non zero. adjacency matrices associated with sparse graphs are also sparse.

tree

a branching structure between nodes. A general term for a finite, connected non-empty graph G(V,E), where each node, or vertex, except for one distinguished node called the root, has a single parent. The root has no parent vertex.

k-d tree of order p

a bst used to organize p-dimensional keys, a binary search tree property is supported except that the portion of the key that is used to determine branch decisions rotates between p coordinate positions at each level of the tree. That process is called the key discriminator process.

Binary-Heap

a complete(or left complete) binary tree where the value in the root of every subtree is no greater than the values in its child nodes (min heap) or greater than or equal to the values in its child nodes (max heap). Used as the basis for priority queue

general tree

a finite set of elements that consists of a root and zero or more disjoint subsets. The only relationships that exist is parent, child, and sibling relationship. Only a hierarchy is established.

k-ary tree

a finite set of elements that is either empty or consists of k disjoint subsets, each a ________

list

a finte set of elemnts or a connected graph of elements, where each element can have edges with at most 2 other elements. This means the number of edges is proprtional to the number of vertices (elements) by some constant c > 0. E = cV, so the number of edges grows linearly with the number of vertices.

planar graph

a graph in which edges only intersect at vertices

full k-ary tree

a k-ary tree in which all internal nodes have k non empty children. A finite set of elements with a root and a disjoint set of empty or non-empty subsets(children), each of which is a ______ k-ary tree

k-way search tree

a k-ary tree where every node can hold keys(or key-data pairings) and a k-way decision is made based on the k-ary search tree property

left-complete k-ary tree

a left complete k-ary tree is complete, except for the last level, where nodes are filled in from left to right. After the last node, there are no more non-empty nodes to the right

Hashing

a method that performs all dictionary operations in O(1) expected time under assumptions about the hashing function being used

skiplist

a probablistic structure based on a linked list but with several levels of links to support navigation, which is technically O(n), but expected value is actually O(logn). Number of links per element is determined at insertion during runtime by a random number generator implementation of a coin toss. The average number of links per node is 2, and the storage requirements about that for an avl tree. Complexity is about that of linked list, insertion and deletion plus a few more links.

ordered tree

a tree in which the relative order of the subtrees matter. Associated with k-ary trees, but can also be applied to general trees.

hash function

an easily computable functin that maps a key, x, to a virtually random index in the range [0...m-1] where m is the number of keys in the table

k-way search trie

an extended k-ary tree in which the keys are all stored in the extenders and the internal nodes are used to facilitate search to the appropriate leaf. Values must satisfy k-ary search property as well. A p + 1 level k-way search trie will have at most kp external nodes.

full k-ary tree corollary

any k-ary tree with n nodes has P=(k-1)n + 1 empty child pointers

internal node

associated with trees but can extend to graphs as well. refers to any node that is not a leaf node. Any node that has at least one non-empty child pointer, for k-ary trees. They require space allocated for their child pointers and start life as leaf nodes, while tries _______ never change roles.

external sorting

basic idea is to make sorted runs that fit into main memory, and merge sorted runs. This type of sorting usually done with big data. External sorting heap replacement algorithm practice: https://opendsa-server.cs.vt.edu/ODSA/Books/Everything/html/ExternalSort.html

graph (V,E)

consist of a finite set of vertices, V, and a set of edges, E, where G(V, E) edge < vi, vj > connects vi to vj. All graphs are finite in data structures where |V| = n.

internal sorting

data is able to be manipulated and sorted within RAM. This type of sorting includes includes all previously learned sorting algorithms, with no assumption on data, where the order matters sometimes.

Separate chaining

each mth location is a head pointer which links to more entries in the mth location, where lamba = (number of entries in this location)/m.

sparse graph

graph with set of edges for n vertices is within O(n)

Secondary Clustering

happens when keys with different hash values have nearly the same probe sequence(does not occur in chaining but does occur in open addressing probing). As table becomes denser, it becomes harder to find empty spaces.

Open addressing

if the mth location is occupied then use a secondary find function, f, to find the next available location. This is called probing. If primary clustering is avoided, then open addressing is more efficient than chaining. Done incrementing (h(x) + f(i))mod(m).

ordered list

if we can distinguish the 1st, 2nd, and so on elements from each other, then the positioning in the list imparts some type of ordering that is independent of the keys.

Complete K-Ary Tree

is full with all leaves on the same level. If you add one more node, you must add another level. They are used for d-ary heaps to ensure they can be stored in static arrays.

external node

leaf node of many structures. k-ary trees have the external node with k empty children, while k-ary tries have the external node as a leaf node with no children.

Point Quadtree(K-ary tree)

structure used to support 2D, 3D, or larger D search. These are also k-way search trees. Partitioning is based on the keys inserted and its shape is determined by the insertion of its keys.

Dynamic Data Set

the fact that either the number of elements, the values of the keys stored therein, or both are expected to very throughout the program/ application lifecycle

extended k-ary tree

the internal nodes all have at least one non empty child. However a 2nd kind of node, called an extender, is used to represent a terminal child. Extenders do not have children. A k-ary tree with extenders added is essentially full. All extended k-ary trees are full

full k-ary tree theorem

the number of external nodes in a full k-ary tree satisfies E = (k-1)i + 1, where i is the number of internal nodes in the tree.

sorted list

the ordering of elements in a list is based on the relationships of the keys present among the list


Conjuntos de estudio relacionados

Chpt 12: Interest Groups and Civic and Political Engagement

View Set

PSYCH 316 FINAL EXAM STUDY GUIDE

View Set

CIS 310 Management Information Systems

View Set