Eulerian Paths and Cycles
[8/50%]How many multigraphs are there on given vertices that are
directed, without multiple edges but possibly with loops?
undirected, without loops but possibly with multiple edges?
A multigraph (or a graph with loops and multiple edges) is a square table of nonnegative integers that is symmetric with respect to the main diagonal. The number at the intersection of the -th row and the -th column is interpreted as the number of edges (or the multiplicity of the edge) between the vertices numbered and when , and as the number of loops at the vertex numbered when . An edge is called multiple if its multiplicity is greater than one.
A directed multigraph (or a directed graph with loops and multiple edges) is a square table of nonnegative integers. If some cell (no matter whether diagonal or not) contains a number greater than 1, then the directed multigraph is said to have multiple edges.
How many multigraphs are there on given vertices that have edges and are
undirected, without loops and multiple edges?
undirected, with multiple edges and loops allowed?
An Eulerian cycle (path) in a multigraph is a cycle (path) that passes along every edge of the multigraph exactly once.
A connected multigraph has an Eulerian cycle if and only if the degree of each of its vertices is even.
A connected multigraph has an Eulerian cycle if and only if its edge set decomposes into non-self-intersecting cycles.
Under what condition does a multigraph have an Eulerian path?
Under what condition does a directed multigraph have a directed Eulerian cycle?
For which does the graph have an Eulerian cycle?
The same for the graph .
If the number of vertices of odd degree in a connected graph equals , then its edge set can be represented as the union of paths, none of which passes along any edge twice and no two of which have common edges.
The edges of a graph in which the degree of each vertex is even can be supplied with arrows so that at each vertex the in-degree equals the out-degree.
All edges of a connected graph are colored in two colors. Each vertex has equally many edges of both colors leaving it. Then from any vertex one can reach any other one, changing the color of the edge at every step.
A connected graph drawn in the plane without self-intersections has an Eulerian cycle if and only if its faces can be properly colored in 2 colors, i.e., so that the color changes when crossing each edge.
The in-degree of a vertex of a directed multigraph is the number of edges entering it (counted with multiplicity). The out-degree is defined similarly. Here a loop of multiplicity ``contributes'' both to the in-degree and to the out-degree.
A mathematician has forgotten the three-digit code of his lock. The lock opens if the three digits of the code are entered consecutively (even if other digits were entered before that). The mathematician enters one digit per second; each entered digit is appended at the end. Prove that the mathematician can open the lock within
29 seconds if only the digits 1, 3 and 7 can be used in the code;
1002 seconds if ten digits can be used in the code.
Formulate and prove the ``'' rule for opening the lock within 1002 seconds.
A de Bruijn sequence (d.B.s.) with parameters and is a sequence whose elements belong to a given set of elements (usually ), such that all of its subsequences of length are distinct and among these subsequences all possible sequences occur. (Thus the length of a d.B.s. equals .)
(An infinite periodic sequence with period , each subsequence of length of which is a d.B.s. with parameters and , is also called a d.B.s.)
Construct a de Bruijn sequence with parameters (``binary'') and
, starting with 111;
, starting with 1011;
, ending with 1010.
Consider the sequence of zeros and ones constructed by the following rules. It starts with ones. After that, we write 1 only if, when writing 0, not all subsequences of length of the new sequence are distinct. If even when writing 1 not all subsequences of length of the new sequence are distinct, then we stop writing the sequence. Prove that in this way a de Bruijn sequence is obtained.
A connected directed multigraph with vertices is given. The in-degree of each vertex equals its out-degree.
There exists a tree containing all vertices of this multigraph, all of whose edges are directed towards vertex 1.
Fix a tree from part (1). We traverse this graph (along the arrows), passing along each edge at most once. First we leave vertex 1 in an arbitrary direction. Next, suppose we have arrived at some vertex . We leave it along any edge not belonging to , if this is possible. If it is impossible, we leave it along the edge belonging to (such an edge is unique). Prove that the walk ends at vertex 1 and that the result is a directed Eulerian cycle.
The number of directed Eulerian cycles in this multigraph is a multiple of the number .