Legend has it that young Wang Anshi(1021-1086, Northern Song Dynasty, poet and politician) went to the capital Bianliang sitting the imperial examinations, in which the top learners would be selected as the ministers in the court. On his way, Wang Anshi passed by a big house, and saw "head half" of a couplet on a carousel lantern hanging in front of a big house, reading: walking horse lantern, horse lantern walking, lantern extinguished horse stopped trotting. " "Walking Horse Lantern" is carousal lantern, used for riding horse during night.
Wang Anshi found out that this house belonged to a Ma family, a very beautiful young girl lived there, she made up this witty sentence as head half, seeking for tail half to make up a perfect couplet, if anybody could come up with the "tail"half of this couplet, she will marry him. Wang Anshi appreciated the ingenious idea of the phrase, and secretly fell in love with that girl.
By Bianjing, Wang Anshi successfully battled through Poetry, Fu (descriptive prose interspersed with verse), and Celun (Discourse on politics), but unexpectedly the Emperor Himself wanted an extra interview to test candidate's response. When it was Wang Anshi's turn, the Emperor gave him this head half of a couplet, "Flying tiger flag, flag tiger flying, flag rolling tiger hide itself ." This sentence was also very witty, means "a flag with a flying-tiger tottom on it, it is not the tiger that is flying by itself, but the flying flag makes it, when the flag rolls, people can not see the tiger as if the tiger hide in the flag." Wang Anshi realized immediately the right part of the couplet by the girl was the perfect fit to the emperor's couplet, so he took the girl's part as the answer
without hesitation. The Emperor was delighted to see the matching half of his couplet was so talent and harmonious that He gave Wang highest appraisal.
As soon as Wang Anshi finished the examination, he came back to Ma's house day and night without stop. The carousal lantan was still hung under the evedrop in front of Ma's house, Wang Anshi gave the girl "flying tiger flag" sentence as the tail half, Miss Ma also rejoiced with Wang's answer, and consented his marriage.
On the wedding ceremony, the herald came reporting: Wang Anshi has passed the highest imperal examinations, His name is on the Golden Board, this was another good news, double happiness. For the wedding, the couple DOUBLED the Chinese character, HAPPY, together, on a red piece of paper and put it on the wall to express the happiness for the two events. And from then on, it has been taken on and became a social custom.
There is another version of the origin of DOUBLE HAPPINESS. This story happened in the Tang Dynasty, there was also a young student who was on the way to the capital to attend the national final examination. Unfortunately, he fell ill halfway when he passed through a mountain village. Thanks to a herbalist doctor and his daughter, he was taken to their house and treated well. He recovered quickly due to the father and the daughter's good care. Well, when he had to leave, he found it hard to say good-bye to the pretty girl, and so did she. They fell in love. So the girl wrote down the upper half of an antithetical couplet for the student to match:
"Green trees against the sky in the spring rain while the sky set off the spring trees in the obscuration."
"Well, I can make it though it is not easy. But you'll have to wait till I have finished the examination." replied the student. The young girl nodded in significance.
In the examination the young man passed many exams and at last attend the interview by the emperor Himself. As luck would have it, he was asked by the emperor to finish a couplet, which would need a right part as the answer. The emperor wrote:
"Red flowers dot the land in the breeze's chase while the land colored up in red after the kiss."
The result is such as you have already knew from Wang Anshi's story.