Quivers

Quivers are represented via their adjacency matrix. Vertices are numbered from $1$ to $n$.

QuiverTools.QuiverType

Summary

struct Quiver

A quiver is represented by its adjacency $n \times n$ matrix $adjacency = (a_{ij})$,
where $n$ is the number of vertices and $a_{ij}$ is the number of arrows $i \to j$.

Fields

adjacency :: AbstractMatrix{Int}
name :: String

source

Constructors

QuiverTools implements constructors for most known quivers.

QuiverTools.kronecker_quiverFunction
kronecker_quiver(m::Int)

Construct the Kronecker quiver with m arrows.

Input

  • m: (Default = 2) The number of arrows.

Output

The Kronecker quiver with m arrows.

Examples

julia> kronecker_quiver(3)
3-Kronecker quiver
source
QuiverTools.loop_quiverFunction
loop_quiver(m::Int)

Construct the loop quiver with m arrows.

Input

  • m: The number of arrows.

Output

The loop quiver with m arrows.

Examples

julia> loop_quiver(4)
4-loop quiver
source
QuiverTools.subspace_quiverFunction
subspace_quiver(m::Int)

Construct the subspace quiver with m + 1 vertices.

Input

  • m: The number of subspace-vertices.

Output

The subspace quiver with m subspaces.

Examples

julia> subspace_quiver(3)
3-subspace quiver

julia> n_vertices(subspace_quiver(3))
4
source
QuiverTools.three_vertex_quiverFunction
three_vertex_quiver(m12::Int, m13::Int, m23::Int)

Construct the three-vertex quiver with the given arrow counts.

Input

  • m12: The number of arrows from vertex 1 to vertex 2.
  • m13: The number of arrows from vertex 1 to vertex 3.
  • m23: The number of arrows from vertex 2 to vertex 3.

Output

A three-vertex quiver with the specified arrows.

Examples

julia> three_vertex_quiver(1, 2, 3)
Acyclic 3-vertex quiver
source
QuiverTools.cyclic_quiverFunction
cyclic_quiver(n)

Construct the cyclic quiver on n vertices.

Examples

julia> cyclic_quiver(4)
cyclic quiver on 4 vertices
source
QuiverTools.bipartite_quiverFunction
bipartite_quiver(m, n)

Construct the bipartite quiver on m and n vertices.

Input

  • m: The number of vertices in the first part.
  • n: The number of vertices in the second part.

Output

The bipartite quiver with m + n vertices.

Examples

julia> bipartite_quiver(2, 3).adjacency
5×5 StaticArraysCore.SMatrix{5, 5, Int64, 25} with indices SOneTo(5)×SOneTo(5):
 0  0  1  1  1
 0  0  1  1  1
 0  0  0  0  0
 0  0  0  0  0
 0  0  0  0  0
source
QuiverTools.opposite_quiverFunction

" opposite_quiver(Q::Quiver)

Construct the opposite quiver.

The opposite quiver has the same vertices, and an arrow $j \to i$ for every arrow $i \to j$ in the original quiver.

Input

  • Q::Quiver: The quiver to be reversed.

Output

The quiver with the same vertices and reversed arrows.

Examples

julia> Q = kronecker_quiver()
2-Kronecker quiver

julia> opposite_quiver(Q)
opposite of 2-Kronecker quiver
source
QuiverTools.double_quiverFunction
double_quiver(Q::Quiver)

Construct the double of a quiver.

The double of a quiver has the same vertices, and for every arrow $i \to j$ in the original quiver, an arrow $j\to i$ is added. In other words, the double of a quiver is the quiver obtained by adding the transpose of the adjacency matrix.

Examples

julia> Q = kronecker_quiver();

julia> double_quiver(Q)
double of 2-Kronecker quiver
source
QuiverTools.dynkin_quiverFunction
dynkin_quiver(type, n)

Construct the Dynkin quiver, with arbitrary orientation of the arrows.

Examples

julia> dynkin_quiver("D", 4)
Dynkin quiver of type D4
source

Properties

QuiverTools offers various methods to study some graph-theoretical properties of quivers.

QuiverTools.n_verticesFunction
n_vertices(Q::Quiver)

Return the number of vertices of Q.

Examples

julia> Q = kronecker_quiver(4);

julia> n_vertices(Q) == 2
true
source
QuiverTools.n_arrowsFunction
n_arrows(Q::Quiver)

Return the number of arrows of Q.

Examples

julia> Q = kronecker_quiver(4);

julia> n_arrows(Q) == 4
true
source
QuiverTools.arrowsFunction
arrows(Q::Quiver)

Return a list of all arrows of Q.

Examples

julia> arrows(kronecker_quiver(3))
3-element Vector{Tuple{Int64, Int64}}:
 (1, 2)
 (1, 2)
 (1, 2)

julia> arrows(loop_quiver(3))
3-element Vector{Tuple{Int64, Int64}}:
 (1, 1)
 (1, 1)
 (1, 1)
source
QuiverTools.indegreeFunction
indegree(Q::Quiver, j::Int)

Return the number of incoming arrows to the vertex j.

Examples

julia> Q = kronecker_quiver(4);

julia> indegree(Q, 1)
0

julia> indegree(Q, 2)
4
source
QuiverTools.outdegreeFunction
outdegree(Q::Quiver, i::Int)

Return the number of outgoing arrows from the vertex i.

Examples

julia> Q = kronecker_quiver(4);

julia> outdegree(Q, 1)
4

julia> outdegree(Q, 2)
0
source
QuiverTools.is_acyclicFunction
is_acyclic(Q::Quiver)

Check whether Q is acyclic, i.e., has no oriented cycles.

Examples

julia> Q = kronecker_quiver(4);

julia> is_acyclic(Q)
true
source
QuiverTools.is_connectedFunction
is_connected(Q::Quiver)

Check whether Q is connected.

Examples

julia> is_connected(Quiver([0 1 0; 0 0 1; 1 0 0]))
true

julia> is_connected(Quiver([0 1 0; 1 0 0; 0 0 2]))
false

julia> is_connected(kronecker_quiver(4))
true

julia> is_connected(loop_quiver(4))
true

julia> is_connected(subspace_quiver(4))
true
source
QuiverTools.is_sinkFunction
is_sink(Q::Quiver, j::Int)

Checks if the vertex j is a sink, i.e., a vertex with no outgoing arrows.

Examples

julia> Q = kronecker_quiver(4);

julia> is_sink(Q, 1)
false

julia> is_sink(Q, 2)
true
source
QuiverTools.is_sourceFunction
is_source(Q::Quiver, i::Int)

Check whether the vertex i is a source, i.e., a vertex with no incoming arrows.

Examples

julia> Q = kronecker_quiver(4);

julia> is_source(Q, 1)
true

julia> is_source(Q, 2)
false
source
QuiverTools.underlying_graphFunction
underlying_graph(Q::Quiver)

Return the (necessarily symmetric) adjacency matrix of the underlying graph of Q.

Examples

julia> Q = kronecker_quiver(4);

julia> underlying_graph(Q) == [0 4; 4 0]
true
source