In most of the countries, the president is recognized as the head diplomat (option 3), this means that when the president or ruler of another nation is elected, the president has the option of recognizing the election of the foreign president, or to not do it if he or she was chosen under dubious or illegal circumstances.