79b - When the children cling to the mother, that is halachikly valid evidence that they are the children of the mother. We know Shlomo Hamelech determined who was the mother of the baby in a case where the child was a baby, and too young to be clinging to its mother. Are there applications from Shlomo Hamelech's case we can use? Also, can we use DNA tests to determine paternity and maternity?
In Bava Batra, 58a the Talmud relates certain rules relating to the actions of a dayan. “A certain man was reputed (muchzak) to have many sons and was informed just before his death that only one of those sons were his and he left all his property to that son, and R. Bnah told all of the sons to beat the grave until the corpse was uncovered and they all went, but one did not go and R. Bnah declared he was the son.” The Meiri explains the Gemara in a surprising manner: “Similarly an experienced (muflag) judge must sometimes decide according to umdena (approximate estimation, from the word moded, to measure [based on Jastrow]) according to the path whereby Solomon sometimes judged, as is well known with the two women who came before him...these matters and similar situations are only given to a wise king or a sage of exceptional wisdom and pilpul and sharpness much greater than all the other sages of his generation in all types of knowledge.” That is, R' Bnah had no firm proof that this was the son, but he felt the real son could not psychologically beat and uncover his own father's grave, and this test was only an umdenah, not a firm proof, but he ruled according to the results of this test. (This idea of the Meiri is also cited in BY C”M 15 in the name of Rosh, Teshuvot 107:6 and is also mentioned by Rambam, Hil. Sanhedrin 24:1).
Meiri clearly states that when the two parties have competing claims that would not cancel each other or if a reliable claim was made without dispute, but the implications thereof are nearly impossible to determine, the dayan can use his cleverness and cunning to decide which party’s claims are valid, (or the implications of the undisputed reliable claim). This was the manner by which King Solomon determined which of the two women was the mother of the live child. This decision was also called ruach hakodesh by the Talmud (Makos 23b). So "a sage of exceptional wisdom and pilpul and sharpness much greater than all the other sages of his generation in all types of knowledge” was able to judge based on his great knowledge of all aspects of human life and behavior, but we may not. So Shlomo Hamelech's ruling is not applicable to us.