In 1 Kings 3:16–28, Solomon judges a dispute between two prostitutes about the parentage of a baby. Readings of the story that I have previously seen indicate that Solomon identifies the mother after threatening to have the baby cut in half. (An example would be this summary of the haftarah from Chabad.) The logic of his ruse makes sense: the actual mother of the child would prefer to have the child raised by another woman rather than dead.
However, the footnotes in the Jewish Study Bible seem to indicate that Solomon already knew who the mother was and simply chose to reveal the mother's identity with this ruse.
23: One says … the other says … : Solomon discerns a distinctive pattern in each woman's speech: The more loquacious one emphasizes death first while the other emphasizes life. Solomon intuits who is the mother of the living child and announces it circumspectly. 24–26: Since justice requires a more convincing demonstration of truth, Solomon stages a confrontation in which the passionate public behavior of the mother emphasizing life validates his intuition.
Assuming I'm not just splitting hairs here, when exactly did Solomon figure out the mother's identity? If he already knew (in a sense) after the women spoke, was the confrontation supposed to confirm his answer, or was it just an instrument used to force the answer to be revealed "naturally"?