"Having received the letter, he was so excited". "Wanting to join a famous and great university in town, she has been studying very hard these days. They are both complex sentences because they both contain a subordinate clause (underlined). PaulM