Skip to main content

11 docs tagged with "algorithms"

View All Tags

B-Trees

The goal of a B-tree is to not have to load an entire tree into memory. Only a bit by bit can be loaded in for processing. The order of a B-tree means something slightly different then with a normal tree.

Bags

A bag is a data structure that can contain the same element multiple times which is why it is often also called a multiset. The order of adding elements is not necessarily given, this depends on the implementation. Common operations on a bag are adding elements, removing elements and searching for a specific element.

Binary Trees

A binary tree is a tree with the order of 2. Meaning that a node is either a leaf or has left and/or right child.

General Definition

Trees have nodes that hold the data and edges which connect the nodes. An empty tree obviously has no nodes and therefore no data.

Graph Traversal

The goal of graph traversal is to visit each vertex in a graph. This can be done a multitude of ways.

Sets

A set is a data structure that can hold unique elements. It represents a mathematical set which in german is called a "Menge". This means that an element is either in the set or it isn't. Just like with a bag you have the common operations of adding elements, removing elements and searching for a specific element.

Shortest Path

Before we see how to find the shortest path from vertex $a$ to vertex $b$ we need to define a few things.

Storing Graphs

There are multiple ways of storing graphs. Depending on the type of graph and the requirements a certain storage method might be preferred.

Topological Sort/Ordering

The goal of a topological sort is given a list of items with dependencies, (ie. item 5 must be completed before item 3, etc.) to produce an ordering of the items that satisfies the given constraints. In order for the problem to be solvable, there can not be a cyclic set of constraints. (We can't have that item 5 must be completed before item 3, item 3 must be completed before item 7, and item 7 must be completed before item 5, since that would be an impossible set of constraints to satisfy.) Meaning we can model this problem with a directed unweighted acyclic graph. When all the vertices are topologically ordered in a row all the edges go from left to right.