Although the negotiations have already started, a final deal will only come after the votes in all outstanding electorates are finalised and the election writs have been returned to the Governor-General, Quentin Bryce.
As the incumbent Prime Minister, Julia Gillard will then advise the Governor-General either that her Government continues to enjoy a parliamentary majority (and Ms Bryce may seek written assurances) or that Ms Bryce should speak to Opposition Leader Tony Abbott.
Mr Abbott would then similarly advise whether or not he would enjoy majority support in the House of Representatives and thus should be commissioned as prime minister.
With solid assurances of a majority in the House of Representatives, either Ms Gillard or Mr Abbott would then be able to recommend to the Governor-General the appointment of ministers and the caretaker status of government would cease prior to the convening of the new parliament.
In the event that neither Ms Gillard nor Mr Abbott is able to guarantee a parliamentary majority, Ms Gillard would continue as a caretaker prime minister until the parliament met at the earliest opportunity and the fate of the government was determined by a confidence motion in the House of Representatives.
In any case, a confidence motion is inevitable as soon as the parliament is convened. This could be as late as late November, but is more likely to take place next month or early in October.
In the event that Ms Gillard lost a confidence motion, she would be bound by convention to advise the Governor-General to seek the advice of Mr Abbott. Only in the unlikely event that neither leader was able to command a parliamentary majority would the Ms Bryce be likely to act on advice to call a new election.