Let $P_k$ be the person who shook $k$ hands. $P_{2n-2}$ shook hands with everyone but his or her partner, so $P_0$ must have been the partner. Set them aside, leaving $P_1,\dots,P_{2n-3}$ and the mathematician. Each of these remaining people shook hands with $P_{2n-2}$, so within the group that remains each shook one hand fewer: $P_k$ shook $k-1$ hands for $k=1,\dots,2n-3$. By the same reasoning (or by induction) $P_1$ and $P_{2n-3}$ must be a couple. In general we must have $P_k$ and $P_{2n-2-k}$ forming a couple for $k=0,\dots,n-2$. In particular, $P_{n-2}$ and $P_n$ are a couple. This leaves $P_{n-1}$ to be the mathematician’s husband: he shook $n-1$ hands.
In graph-theoretic terms we have a graph $G_n$ with vertices $v_k$ for $k=0,\dots,2n-2$ such that $\deg v_k=k$, and we have an additional vertex $v$ corresponding to the mathematician. The graph is simple (no loops or multiple edges), and it is known that the vertices can be partitioned into $n$ pairs whose members are not adjacent. We wish to show that $v$ is paired with $v_{n-1}$. This is clearly the case when $n=1$, so assume that $n>1$.
Vertex $c_{2n-2}$ is adjacent to every vertex but itself and the one paired with it, so every vertex but the one paired with it has positive degree; thus, $\{v_0,v_{2n-2}\}$ must form a pair. Remove $v_0$, $v_{2n-2}$, and all adjacent edges, and you have a graph $G_{n-1}$ on $2(n-1)$ vertices with mutatis mutandis the same properties. By the obvious induction hypothesis vertex $v$ is paired with the vertex of degree $n-2$ in $G_{n-1}$, which is $v_{n-1}$ in $G_n$, as desired.
Each of 17 people shakes hands with 14 people (all except themselves and their 2 neighbors), so there are
$$\frac{17\times 14}{2} = 119$$
handshakes (dividing by 2 to account for symmetry, as you would otherwise count "$A$ shaking hands with $B$" and "$B$ shaking hands with $A$" as distinct events).
Best Answer
You may get the answer from the following link- Classic Hand shake question. Now then, also if you didn't understand the answer then I might give a better explanation. We can easily see that there were in total of 2n members in the party inclusive the host couple. All 2n-1 people gave a different reply for the number of handshake. So, all answers from 0 to 2n-2 would show the number of handshake for different people (which are in total 2n-1). Now, take an assumption that if the husband doesn't know anyone then the wife will know her and vice versa. So, sum of handshake of each husband and wife would come out to be 2n-2. Now placing different values can cover all the constraints for the question. The first husband handshake 2n-2 people and his wife, 0 people. Then the next husband handshake 2n-1 people and his wife 1 person. All vales would be covered. But only in a single pair of husband and wife, both will shake hand with n-1 people((2n-2)/2). But this can only be possible if this pair of husband and wife is of the host. So, the host asked all other people and hence his own case would not be considered. So, the hostess shook hands with n-1 people. Hope my solution is clear enough for you. Please increase my reputation!!