Problem 1
Prove that in every simple graph with [tex]n\ge 2[/tex] vertices there are at least two vertices of equal degree.
Solution: In a simple graph (no loops and no multiple edges) every vertex can be adjacent only to the other [tex]n-1[/tex] vertices, so the degree of every vertex belongs to the set [tex]\{0, 1, \ldots, n-1\}[/tex], which has [tex]n[/tex] elements.
The values [tex]0[/tex] and [tex]n-1[/tex] cannot both occur: a vertex of degree [tex]n-1[/tex] is adjacent to all other vertices, and then no vertex has degree [tex]0[/tex]. Hence the [tex]n[/tex] degrees take at most [tex]n-1[/tex] different values, from one of the sets
[tex]\{0, 1, \ldots, n-2\}\text{ or }\{1, 2, \ldots, n-1\}[/tex]
By the pigeonhole principle, two of the [tex]n[/tex] vertices have equal degrees.
Problem 2
The dual of a Boolean function [tex]f(x_1,\ldots,x_n)[/tex] is defined as [tex]f^*(x_1,\ldots,x_n)=\overline{f(\overline{x_1},\ldots,\overline{x_n})}[/tex]. Find the dual of the function [tex]f(x,y)=x\oplus y\oplus 1[/tex], where [tex]\oplus[/tex] denotes addition modulo [tex]2[/tex].
Solution: We use [tex]\overline{u}=u\oplus 1[/tex] and [tex]1\oplus 1=0[/tex]. First we substitute the negated variables:
[tex]f(\overline{x},\overline{y})=(x\oplus 1)\oplus(y\oplus 1)\oplus 1=x\oplus y\oplus 1[/tex]
Then we negate the result:
[tex]f^*(x,y)=\overline{x\oplus y\oplus 1}=x\oplus y\oplus 1\oplus 1=x\oplus y[/tex]
Check with the truth table: for [tex](x, y)[/tex] equal to [tex](0, 0)[/tex], [tex](0, 1)[/tex], [tex](1, 0)[/tex], [tex](1, 1)[/tex] the function [tex]f[/tex] takes the values [tex]1, 0, 0, 1[/tex], while [tex]f^*[/tex] takes the values [tex]0, 1, 1, 0[/tex], i.e. [tex]f^*=\overline{f}[/tex].
A common mistake is to compute only [tex]f(\overline{x},\overline{y})[/tex] and forget the outer negation; this gives [tex]f[/tex] itself, i.e. the wrong answer [tex]x\oplus y\oplus 1[/tex].
Problem 3
The graph [tex]G=(V,E)[/tex] has vertices [tex]V=\{v_1,v_2,v_3,v_4,v_5\}[/tex] and edges [tex]E=\{v_1v_3,\ v_1v_4,\ v_1v_5,\ v_2v_4,\ v_2v_5,\ v_3v_5,\ v_4v_5\}[/tex]. How many walks of length [tex]4[/tex] from [tex]v_2[/tex] to [tex]v_5[/tex] are there? (A walk of length [tex]4[/tex] from [tex]v_2[/tex] to [tex]v_5[/tex] is a sequence of vertices [tex]v_2=u_0,u_1,u_2,u_3,u_4=v_5[/tex] in which every two consecutive vertices are joined by an edge; vertices and edges may repeat.)
Solution: Let [tex]A[/tex] be the adjacency matrix of [tex]G[/tex]. The entry [tex](A^k)_{ij}[/tex] equals the number of walks of length [tex]k[/tex] from [tex]v_i[/tex] to [tex]v_j[/tex] (by induction on [tex]k[/tex]: a walk of length [tex]k+1[/tex] is a walk of length [tex]k[/tex] followed by one more edge). In particular, [tex](A^2)_{ij}[/tex] is the number of common neighbors of [tex]v_i[/tex] and [tex]v_j[/tex] (the degree of [tex]v_i[/tex] when [tex]i=j[/tex]). The sets of neighbors of the vertices are:
[tex]N(v_1)=\{v_3,v_4,v_5\}, \quad N(v_2)=\{v_4,v_5\}, \quad N(v_3)=\{v_1,v_5\}[/tex]
[tex]N(v_4)=\{v_1,v_2,v_5\}, \quad N(v_5)=\{v_1,v_2,v_3,v_4\}[/tex]
Row [tex]2[/tex] of [tex]A^2[/tex] (common neighbors of [tex]v_2[/tex] with [tex]v_1,\ldots,v_5[/tex]) is [tex](2, 2, 1, 1, 1)[/tex], and column [tex]5[/tex] (common neighbors of [tex]v_5[/tex] with [tex]v_1,\ldots,v_5[/tex]) is [tex](2, 1, 1, 2, 4)[/tex]. Since [tex]A^4=A^2A^2[/tex], we get
[tex](A^4)_{25}=\sum_{k=1}^{5}(A^2)_{2k}(A^2)_{k5}=2\times 2+2\times 1+1\times 1+1\times 2+1\times 4=13[/tex]
Problem 4
Find the general term of the sequence defined by [tex]a_1=1[/tex], [tex]a_2=2[/tex] and [tex]a_n=3a_{n-1}-2a_{n-2}+1[/tex] for [tex]n\ge 3[/tex].
Problem 5
Let [tex]G[/tex] be a finite simple graph with at least three vertices that has exactly one vertex of degree [tex]1[/tex]. Prove that [tex]G[/tex] contains a cycle.