Implementations - dvberkel/debruijn GitHub Wiki

Below lists the various starter projects which allow you to develop an algorithm to generate a De Bruijn sequence in your favorite programming language.

Programming Languages

Ubiquitous Languages

All starter projects adhere to the following language when describing the domain.

Combinatorics

  • Alphabet a collection of letters.
  • Letter an element of an alphabet.
  • Word is a sequence of letters over an alphabet. A notable Word is the empty sequence i.e. a sequence of zero letters. A Word knows two messages. Firstly append, which accepts a letter and creates new word. Secondly pipe, which accepts a letter and creates a new word.
  • WordGenerator a class/module/actor which is responsible for generating all words over an alphabet of certain length. It will respond to a message each which should yield every word to a WordYieldBlock.
  • WordYieldBlock a parameter to the each message of the WordGenerator class/module/actor. It has a yield message which accepts a word for further processing.

Graph

  • Graph is a object which holds vertices and edges. A graph responds to the message allVertices and allEdges which accept a VertexYieldBlock and a EdgeYieldBlock respectively and yield there respective elements to.
  • Vertex we will only consider words as vertices
  • Edge a directed pair of vertices. An edge has a source and a sink.
  • source the vertex from which an edge originates.
  • sink the vertex in which an edge terminates.
  • VertexYieldBlock a block which can be used to process all vertices of a graph.
  • EdgeYieldBlock a block which can be used to process all vertices of a graph.

Cycle

  • Cycle a path over a graph for which the origin is the same as the destination.

  • Path a collection of edges such that for a pair of consecutive edges u and v

    u.sink = v.source

  • origin the source of the first edge in a path.

  • destination the sink of the last edge in a path.