Raw

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)\deg(v), Δ(G)\Delta(G) (maximum degree), ω(G)\omega(G) (largest clique), χ\chi (chromatic number), χ\chi' (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>1), and read off the degrees.

(a)

AA BB CC DD
AA 0 1 0 1
BB 1 0 1 0
CC 0 1 0 1
DD 1 0 1 0

Zero diagonal (no loops) and every entry 0/10/1 (simple). The $1$s give the edges AB, AD, BC, CDAB,\ AD,\ BC,\ CD — a 4-cycle A ⁣ ⁣B ⁣ ⁣C ⁣ ⁣D ⁣ ⁣AA\!-\!B\!-\!C\!-\!D\!-\!A. Every row sums to 22, so degA=degB=degC=degD=2\deg A=\deg B=\deg C=\deg D=2.

Undirected graph of matrix (a): the 4-cycle A-B-C-D

(b)

AA BB CC DD
AA 1 0 1 1
BB 0 0 1 1
CC 1 1 0 1
DD 1 1 1 1

The diagonal has aAA=1a_{AA}=1 and aDD=1a_{DD}=1: a loop at AA and a loop at DD. The off-diagonal $1$s give AC, AD, BC, BD, CDAC,\ 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\deg A=3+1=4,\ \deg B=2,\ \deg C=3,\ \deg D=4+1=5.

Undirected graph of matrix (b): edges AC, AD, BC, BD, CD with loops at A and D

(c)

AA BB CC DD
AA 1 2 0 1
BB 2 0 3 0
CC 0 3 1 1
DD 1 0 1 0

A multigraph: aAB=2a_{AB}=2 (two parallel edges A ⁣= ⁣BA\!=\!B), aBC=3a_{BC}=3 (three parallel edges B ⁣= ⁣CB\!=\!C), single edges ADAD and CDCD, and loops at AA (aAA=1a_{AA}=1) and CC (aCC=1a_{CC}=1). Degrees: degA=2(loop)+2+1=5, degB=2+3=5, degC=2(loop)+3+1=6, degD=1+1=2\deg A=2(\text{loop})+2+1=5,\ \deg B=2+3=5,\ \deg C=2(\text{loop})+3+1=6,\ \deg D=1+1=2.

Undirected multigraph of the third matrix: double edge A-B, triple edge B-C, single edges A-D and C-D, loops at A and C

Задача 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 \to column), noting loops and multiplicities, and read off the in- and out-degrees.

(a)

AA BB CC DD
AA 0 0 1 1
BB 0 0 1 0
CC 1 1 0 1
DD 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 ⁣ ⁣CA\!\to\!C,\ A\!\to\!D,\ B\!\to\!C,\ C\!\to\!A,\ C\!\to\!B,\ C\!\to\!D,\ D\!\to\!A,\ D\!\to\!B,\ D\!\to\!C. Out-degrees (row sums) deg+ ⁣:A=2,B=1,C=3,D=3\deg^{+}\!:A{=}2,B{=}1,C{=}3,D{=}3; in-degrees (column sums) deg ⁣:A=2,B=2,C=3,D=2\deg^{-}\!:A{=}2,B{=}2,C{=}3,D{=}2.

Directed graph of matrix (a): nine arcs among A, B, C, D

(b)

AA BB CC DD
AA 0 2 3 0
BB 1 2 2 1
CC 2 1 1 0
DD 1 0 0 2

Asymmetric with a non-zero diagonal: loops at BB (two), CC (one), DD (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 ⁣ ⁣AA\!\to\!B\,(2),\ A\!\to\!C\,(3),\ B\!\to\!A,\ B\!\to\!C\,(2),\ B\!\to\!D,\ C\!\to\!A\,(2),\ C\!\to\!B,\ D\!\to\!A. A number beside an arc is its multiplicity. Out-degrees (row sums) deg+ ⁣:A=5,B=6,C=4,D=3\deg^{+}\!:A{=}5,B{=}6,C{=}4,D{=}3; in-degrees (column sums) deg ⁣:A=4,B=5,C=6,D=3\deg^{-}\!:A{=}4,B{=}5,C{=}6,D{=}3 (each loop adds 11 to both).

Directed multigraph of matrix (b): arcs with multiplicities 2 and 3 and loops at B, C, D

Задача 3 — chromatic number and chromatic index

For each graph find the chromatic number χ\chi (colour the vertices) and the chromatic index χ\chi' (colour the edges). In every figure the vertices are already painted with an optimal colouring.

Throughout, the lower bound χω\chi\ge\omega comes from a triangle (a clique of size 33), and the χ\chi' lower bound is the maximum degree Δ\Delta; a graph with χ=Δ\chi'=\Delta is class 1.

Graph 1

Graph 1 coloured with three colours; a 3-by-3 grid with two diagonals

A 3×33\times3 grid a,b,c/d,e,f/g,h,ka,b,c/d,e,f/g,h,k with the extra diagonals b ⁣ ⁣db\!-\!d and f ⁣ ⁣hf\!-\!h, giving the triangles bdeb\,d\,e and efhe\,f\,h. Maximum degree Δ=4\Delta=4 (at b,d,e,f,hb,d,e,f,h).

  • χ=3\chi=3. A triangle forces χ3\chi\ge3; the three colour classes {b,f,g}, {c,d,h}, {a,e,k}\{b,f,g\},\ \{c,d,h\},\ \{a,e,k\} (shown red / blue / gold) are each independent, so χ3\chi\le3. Hence χ=3\boxed{\chi=3}.
  • χ=4\chi'=4. The four edges at bb need four colours, so χΔ=4\chi'\ge\Delta=4; a proper 44-edge-colouring exists (class 1), so χ=4\boxed{\chi'=4}.

Graph 2

Graph 2 coloured with three colours; a multigraph on five vertices with two double edges

A multigraph on a,b,c,d,ea,b,c,d,e: double edges a ⁣= ⁣da\!=\!d and c ⁣= ⁣ec\!=\!e, plus ab, bc, bd, be, deab,\ bc,\ bd,\ be,\ de — so E=9|E|=9. The triangle bdeb\,d\,e gives χ3\chi\ge3, and Δ=4\Delta=4 (at b,d,eb,d,e).

  • χ=3\chi=3. Parallel edges do not affect χ\chi; the classes {b}, {c,d}, {a,e}\{b\},\ \{c,d\},\ \{a,e\} are independent, so χ=3\boxed{\chi=3}.
  • χ=5\chi'=5. Here Δ=4\Delta=4, yet a colour class is a matching of at most 5/2=2\lfloor5/2\rfloor=2 edges, so at least 9/2=5\lceil 9/2\rceil=5 colours are needed: χ5\chi'\ge5, and 55 suffice. The parallel edges make it class 2 with χ=5\boxed{\chi'=5}.

Graph 3

Graph 3 coloured with three colours; a six-cycle with a central hub and a pendant triangle

A hexagon c ⁣ ⁣a ⁣ ⁣b ⁣ ⁣e ⁣ ⁣h ⁣ ⁣gc\!-\!a\!-\!b\!-\!e\!-\!h\!-\!g with a hub dd joined to all six, a chord c ⁣ ⁣ec\!-\!e (drawn as the top arc), and a triangle efke\,f\,k on the right. Maximum degree Δ=6\Delta=6 (at dd and ee).

  • χ=3\chi=3. The hexagon with its chord is 22-colourable, the hub dd takes a third colour, and the triangle efke\,f\,k reuses the same three: classes {a,e,g}, {d,f}, {b,c,h,k}\{a,e,g\},\ \{d,f\},\ \{b,c,h,k\}. A triangle gives χ3\chi\ge3, so χ=3\boxed{\chi=3}.
  • χ=6\chi'=6. The six edges at dd (or ee) need six colours, so χ6\chi'\ge6; a proper 66-edge-colouring exists (class 1), so χ=6\boxed{\chi'=6}.

Graph 4

Graph 4 coloured with three colours; ten vertices with e as a degree-six hub

Ten vertices aka\ldots k; the centre ee is joined to a,b,c,g,h,ia,b,c,g,h,i, giving Δ=6\Delta=6, and there are many triangles (abe, bce, aeh, ceh, ehia\,b\,e,\ b\,c\,e,\ a\,e\,h,\ c\,e\,h,\ e\,h\,i).

  • χ=3\chi=3. A triangle forces χ3\chi\ge3; the classes {d,e,f}, {a,c,g,i}, {b,h,k}\{d,e,f\},\ \{a,c,g,i\},\ \{b,h,k\} are independent, so χ=3\boxed{\chi=3}.
  • χ=6\chi'=6. The six edges at ee need six colours, so χ6\chi'\ge6; a proper 66-edge-colouring exists (class 1), so χ=6\boxed{\chi'=6}.

Graph 5

Graph 5 coloured with three colours; seventeen vertices with e as a degree-six hub

Seventeen vertices; the hub ee is joined to a,b,c,d,i,ka,b,c,d,i,k, so Δ=6\Delta=6. The triangles adea\,d\,e and deid\,e\,i give χ3\chi\ge3.

  • χ=3\chi=3. The classes {e,g,h,j,m,o,r}, {a,b,c,i,k,l,n,p}, {d,f}\{e,g,h,j,m,o,r\},\ \{a,b,c,i,k,l,n,p\},\ \{d,f\} are independent, so χ=3\boxed{\chi=3}.
  • χ=6\chi'=6. The six edges at ee need six colours, so χ6\chi'\ge6; a proper 66-edge-colouring exists (class 1), so χ=6\boxed{\chi'=6}.

Practical/Practical5/3classroom.md · 7.3 KB · updated 2026-07-31 21:14