3. Classroom tasks and solutions / Аудиторні задачі та розв’язання
Source of tasks. The problems below are taken from the practical-class
assignment for this topic (graph representation and colouring); only the wording
has been translated to English. Each task collects several matrices or graphs, and
all of them are worked here in full. Theory and notation are in
2method.md; recall deg(v), Δ(G) (maximum degree),
ω(G) (largest clique), χ (chromatic number), χ′ (chromatic index).
Задача 1 — draw the undirected graphs of the adjacency matrices
Each matrix below is symmetric, so it describes an undirected graph. Draw it,
noting loops (diagonal) and parallel edges (entries >1), and read off the degrees.
(a)
|
A |
B |
C |
D |
| A |
0 |
1 |
0 |
1 |
| B |
1 |
0 |
1 |
0 |
| C |
0 |
1 |
0 |
1 |
| D |
1 |
0 |
1 |
0 |
Zero diagonal (no loops) and every entry 0/1 (simple). The $1$s give the edges
AB, AD, BC, CD — a 4-cycle A−B−C−D−A. Every row sums to
2, so degA=degB=degC=degD=2.

(b)
|
A |
B |
C |
D |
| A |
1 |
0 |
1 |
1 |
| B |
0 |
0 |
1 |
1 |
| C |
1 |
1 |
0 |
1 |
| D |
1 |
1 |
1 |
1 |
The diagonal has aAA=1 and aDD=1: a loop at A and a loop at D.
The off-diagonal $1$s give AC, AD, BC, BD, CD. Degrees (row sum, plus the
diagonal entry again so each loop counts twice):
degA=3+1=4, degB=2, degC=3, degD=4+1=5.

(c)
|
A |
B |
C |
D |
| A |
1 |
2 |
0 |
1 |
| B |
2 |
0 |
3 |
0 |
| C |
0 |
3 |
1 |
1 |
| D |
1 |
0 |
1 |
0 |
A multigraph: aAB=2 (two parallel edges A=B), aBC=3 (three
parallel edges B=C), single edges AD and CD, and loops at A
(aAA=1) and C (aCC=1). Degrees:
degA=2(loop)+2+1=5, degB=2+3=5, degC=2(loop)+3+1=6, degD=1+1=2.

Задача 2 — draw the directed graphs of the adjacency matrices
Each matrix below is not symmetric, so it describes a directed graph. Draw the
arcs (row → column), noting loops and multiplicities, and read off the in- and
out-degrees.
(a)
|
A |
B |
C |
D |
| A |
0 |
0 |
1 |
1 |
| B |
0 |
0 |
1 |
0 |
| C |
1 |
1 |
0 |
1 |
| D |
1 |
1 |
1 |
0 |
Asymmetric, zero diagonal (no loops). The arcs are
A→C, A→D, B→C, C→A, C→B, C→D, D→A, D→B, D→C. Out-degrees (row sums)
deg+:A=2,B=1,C=3,D=3; in-degrees (column sums)
deg−:A=2,B=2,C=3,D=2.

(b)
|
A |
B |
C |
D |
| A |
0 |
2 |
3 |
0 |
| B |
1 |
2 |
2 |
1 |
| C |
2 |
1 |
1 |
0 |
| D |
1 |
0 |
0 |
2 |
Asymmetric with a non-zero diagonal: loops at B (two), C (one), D (two).
The arcs (with multiplicity) are A→B(2), A→C(3), B→A, B→C(2), B→D, C→A(2), C→B, D→A. A number beside
an arc is its multiplicity. Out-degrees (row sums)
deg+:A=5,B=6,C=4,D=3; in-degrees (column sums)
deg−:A=4,B=5,C=6,D=3 (each loop adds 1 to both).

Задача 3 — chromatic number and chromatic index
For each graph find the chromatic number χ (colour the vertices) and the
chromatic index χ′ (colour the edges). In every figure the vertices are already
painted with an optimal colouring.
Throughout, the lower bound χ≥ω comes from a triangle (a clique of
size 3), and the χ′ lower bound is the maximum degree Δ; a graph with
χ′=Δ is class 1.
Graph 1

A 3×3 grid a,b,c/d,e,f/g,h,k with the extra diagonals b−d and
f−h, giving the triangles bde and efh. Maximum degree Δ=4
(at b,d,e,f,h).
- χ=3. A triangle forces χ≥3; the three colour classes
{b,f,g}, {c,d,h}, {a,e,k} (shown red / blue / gold) are each independent,
so χ≤3. Hence χ=3.
- χ′=4. The four edges at b need four colours, so χ′≥Δ=4; a
proper 4-edge-colouring exists (class 1), so χ′=4.
Graph 2

A multigraph on a,b,c,d,e: double edges a=d and c=e, plus
ab, bc, bd, be, de — so ∣E∣=9. The triangle bde gives χ≥3, and
Δ=4 (at b,d,e).
- χ=3. Parallel edges do not affect χ; the classes
{b}, {c,d}, {a,e} are independent, so χ=3.
- χ′=5. Here Δ=4, yet a colour class is a matching of at most
⌊5/2⌋=2 edges, so at least ⌈9/2⌉=5 colours are needed:
χ′≥5, and 5 suffice. The parallel edges make it class 2 with
χ′=5.
Graph 3

A hexagon c−a−b−e−h−g with a hub d joined to all six, a
chord c−e (drawn as the top arc), and a triangle efk on the right.
Maximum degree Δ=6 (at d and e).
- χ=3. The hexagon with its chord is 2-colourable, the hub d takes a
third colour, and the triangle efk reuses the same three: classes
{a,e,g}, {d,f}, {b,c,h,k}. A triangle gives χ≥3, so
χ=3.
- χ′=6. The six edges at d (or e) need six colours, so χ′≥6; a
proper 6-edge-colouring exists (class 1), so χ′=6.
Graph 4

Ten vertices a…k; the centre e is joined to a,b,c,g,h,i, giving
Δ=6, and there are many triangles (abe, bce, aeh, ceh, ehi).
- χ=3. A triangle forces χ≥3; the classes
{d,e,f}, {a,c,g,i}, {b,h,k} are independent, so χ=3.
- χ′=6. The six edges at e need six colours, so χ′≥6; a proper
6-edge-colouring exists (class 1), so χ′=6.
Graph 5

Seventeen vertices; the hub e is joined to a,b,c,d,i,k, so Δ=6. The
triangles ade and dei give χ≥3.
- χ=3. The classes {e,g,h,j,m,o,r}, {a,b,c,i,k,l,n,p}, {d,f} are
independent, so χ=3.
- χ′=6. The six edges at e need six colours, so χ′≥6; a proper
6-edge-colouring exists (class 1), so χ′=6.
Practical/Practical5/3classroom.md · 7.3 KB · updated 2026-07-31 21:14