Consider the Electrolysis of water reaction $$H_2O \rightarrow H_2+\frac{1}{2}O_2$$ At room temperature and atmospheric pressure, the change in enthalpy of this reaction is $\Delta H=+286kJ/mol$. Now at constant pressure, $\Delta H=Q +W_{other}$, so in order for this reaction to occur, at the bare minimum, we must provide an amount of energy equal to $286kJ/mol$. The question then becomes, of the $286kJ/mol$ required for this reaction to occur, how much can we supply as heat and how much can we supply as work such that the 2nd law isn't violated. Now according to standard reference tables (all values being per mol):
$$S_{H_2O}=70 J/K \,\,\,\,\,\,\,\, S_{H_2}=131 J/K\,\,\,\,\,\, S_{O_2}=205 J/K$$
So if this reaction occurs, the increase in the systems entropy according to these values will be $$\Delta S_{sys}=(131+\frac{1}{2}\cdot 205-70)=+163\,J/K$$ My textbook (Schroeder's Introduction to thermal physics) then says that because of $\Delta S_{sys}=+163\,J/K$, we have that "the maximum amount of heat that can enter the system is therefore $T\Delta S=(298K)(163J/K)=49 kJ$". This fact is bugging me a bit. I can see that because the systems entropy is increasing by $\Delta S_{sys}=+163\,J/K$, we can afford for the entropy of the surroundings to decrease by a maximum of $\Delta S_{surroundings}=-163\,J/K$ without violating the requirement $\Delta S_{universe}>0$. Now since the entropy of the surroundings is reduced when heat is provided to the system ($\Delta S_{surroundings}=-\frac{Q_{to\,system}}{T}$), the max heat the surroundings can supply is simply the aforementioned $T\Delta S_{surroundings}=(298K)(163J/K)=49 kJ$. We can always have the surroundings supply an amount of heat less than $49kJ$ provided we increase $W_{other}$ but we may never have the surroundings supply heat more than $49kJ$.
My problem is the fact that when an amount of heat $Q<49 kJ$ is supplied to the system, we have $\Delta S_{surroundings}>-163\,J/K$. But we also have that $\Delta S_{sys}<163\,J/K$ because $\Delta S_{sys}=\frac{Q_{to\,system}}{T}$. But this change in the systems entropy is clearly less than the required change of $\Delta S_{sys}=+163 J/K$ given by the tables. So surely it is the case that the amount of heat supplied by the surroundings must always be equal to $Q=49kJ$, for if $Q>49kJ$, then we violate the second law, but if $Q<49kJ$ then we fail to create enough entropy for the system to meet its entropic requirement of $\Delta S_{sys}=+163\,J/K$. What am I missing here? Is entropy created within the system by other means in just the right amount? If so, how?
Any help on this would be most appreciated!