1.1. The bases $A D$ and $B C$ of trapezoid $A B C D$ are equal to $a$ and $b(a>b)$.

a) Find the length of the segment cut off by the diagonals on the midline.

b) Find the length of the segment $M N$, the ends of which divide the sides $A B$ and $C D$ in the ratio $A M: M B=D N: N C=p: q$.
1.1. a) Let $P$ and $Q$ be the midpoints of sides $AB$ and $CD$, and $K$ and $L$ be the points of intersection of line $PQ$ with diagonals $AC$ and $BD$. Then $PL = a / 2$ and $PK = b / 2$, so $KL = PL - PK = (a - b) / 2$.

b) Take a point $F$ on side $AD$ such that $BF \| CD$. Let $E$ be the point of intersection of segments $MN$ and $BF$. Then $MN = ME + EN = \frac{q AF}{p+q} + b = \frac{q(a-b) + (p+q)b}{p+q} = \frac{qa + pb}{p+q}$.