What is the expected number of infected people?

Here is a strategy for the follow up question, I don't know if it is the optimal strategy. Following the strategy, for $n=d_1d_2$ with $d_1$ even, after $(d_1-1)(d_2-1)=n-d_1-d_2+1$ rounds of hand shaking, there are still $d_1$ uninfected people. Moreover, if $d_2$ is also even, say $d_2=2k$, then after $n-k-d_1$ rounds of hand shaking there are still $d_1$ healthy people.

For this consider first a slight variation of the original problem: Every person can shake hands with himself (only once since repetition is not allowed). Then, if there are $d_2$ people, at the round number $k$ the $j$th person shakes hand with the person $f_k(j)$, where $$ f_k(j)=\left\{\begin{array}{cc} k+1-j & if\ j\le k \\ d_2+k+1-j & if\ j>k . \end{array}\right. $$ If the first infected person is person number one, then after $k$ rounds there are $k$ infected people (note that in the first round the infected person shakes hands with himself). In particular, after $d_2-1$ rounds there is still one disease free person: person number $d_2$. Note also that if $d_2$ is even then at each even round ($k=2k_1$) no one shakes his own hand.

Now assume again that shaking hand with oneself is not allowed and assume $n=d_1 d_2$ with $d_1$ even. Form $d_2$ groups with $d_1$ persons in each group, and with the first infected person in the first group. Now we consider $d_2-1$ (group) rounds, where in the $k$th round the group number $j$ meets group number $f_k(j)$. A meeting of two groups means $d_1$ individual rounds of hand shaking, but if a group meets itself, there are only $d_1-1$ rounds (a group can meet with itself, but not an individual). In particular, this means that if $f_k(j)=j$ for some $j$, then in that round there are only $d_1-1$ rounds of hand shaking even for the meetings of two different groups, so their meeting is not "complete".

Now after $d_2-1$ group rounds, there is still one group (the group number $d_2$) that hasn't met an infected group. Since each group round consists of at least $d_1-1$ rounds of hand shaking, we obtain that after $(d_1-1)(d_2-1)$ rounds of hand shaking there are still $d_1$ healthy people.

Moreover, if $d_2=2k$, there are $k$ rounds of length $d_1-1$ (with at least one group meeting itself) and $k-1$ group rounds of length $d_1$ (with no group meeting itself). So after $$ k(d_1-1)+d_1(k-1)=n-k-d_1 $$ rounds there are still $d_1$ people healthy, as desired.

Note that for a group meeting itself it is known that there is a hand shaking schedule such that every possible pair has shaken hands after $d_1-1$ rounds.

Note also that when two different groups meet in a group round of length $d_1-1$, one of the possible hand shakes for each person will not be performed, so we don't know if the given schedule can be completed to a complete schedule of $n-1$ rounds with every possible hand shake.

$\bf Example$: Take $n=16$. Then $d_1=d_2=4$ and we form the groups $\{1,2,3,4\}$, $\{5,6,7,8\}$, $\{9,10,11,12\}$ and $\{13,14,15,16\}$.

In the first group round there are three rounds of hand shaking: In $\{1,2,3,4\}$ everyone shakes hands inside the group, the same for $\{9,10,11,12\}$. The persons in $\{5,6,7,8\}$ shake hands with (nearly) all people in $\{13,14,15,16\}$ (3 out of 4 possible rounds). So, after 3 rounds of hand shaking (one group round), one group is infected (4 people).

In the second group round (four individual rounds) the persons in $\{1,2,3,4\}$ shake hands with all people in $\{5,6,7,8\}$ and the persons in $\{9,10,11,12\}$ shake hands with all people in $\{13,14,15,16\}$. So, after 7 rounds of hand shaking (two group rounds), two groups are infected (8 people).

In the third group round there are three rounds of hand shaking: In $\{5,6,7,8\}$ everyone shakes hands inside the group, the same for $\{13,14,15,16\}$. The persons in $\{1,2,3,4\}$ shake hands with (nearly) all people in $\{9,10,11,12\}$ (3 out of 4 possible rounds). So, after $10=n-d_1-\frac{d_2}{2}$ rounds of hand shaking (three group rounds), three groups are infected (12 people) and $4=d_1$ people are still healthy: $\{13,14,15,16\}$.

$\bf Note:$

It is important to understand the function $f_k$. Here are the values for $d_2=4$ and for $d_2=7$.enter image description here


Some thoughts on the main question.

At best, the question is vague and at worst, it is impossible. An immediate interpretation of the question is that at every minute, everyone randomly selects a person to shake hands with, that they have not yet shaken hands with. But this would mean very few (if any) would actually pair up. What do we do the rest? Or when a person has been selected by more than one person?

An alternative interpretation (stretching a bit) is that at every minute, a list of all allowed handshake scenarios is made and that this list has equally many instances of person $p_i$ shaking hands with not-formerly-shaken person $p_j$ as it has of person $p_i$ shaking the hands of any other not-formerly-shaken person $p_k$. A random selection of one of these instances would then fulfill the setup that "if there are $k$ people he/she hasn't shaken hands with, then probability of shaking hands with any of them is $\frac{1}{k}$".

But handshake scenarios do not in general fulfill the bolded part above. The only instances I found where this is true is with $n=2$ or $n=4$. For $n=6$, for example, we have the following list of scenarios at $t=0$:

enter image description here

We see that any of the $15$ scenarios gives an equal probability for everyone of shaking hands with anyone not-formerly-shaken. Let's randomly select a scenario (green) and then exclude those scenarios which are no longer possible (blue):

enter image description here

We see that the remaining scenarios still fulfill the bolded part above. I.e. the remaining choices are equally distributed for everyone. So far, so good. Let's then select another scenario:

enter image description here

We now see that the remaining scenarios are not evenly distributed. In all scenarios, one person is twice as likely to be selected as the others.

The above is also true for $n=8$, which breaks down at the first round. I suspect it is true for all $n \gt 4$, though I can't prove it.

In short, the main question was very vague and probably the best response would have been to ask a lot of clarifying questions.