P'ang Yun 龐蘊(?-811) a lay disciple of Ma-tsu 馬 祖, resolved to follow the Path, threw his wealth into the river, and became a basket weaver. While plying his trade one day, he met a monk begging for alms. Giving the monk some money, Layman P'ang asked him, "What is the meaning of giving alms?" The monk said, "I don't know. What is the meaning of giving alms?" And Layman P'ang replied, "Very few people have heard about it." The monk answered, "I don't understand." And Layman P'ang asked, "Who is it that doesn't understand?" This incident became a kung-an that gave birth to a whole series of hua-t'ous of the "who" type. Some variations on it were "Who is reciting Buddha's name?", "Who is investigating Ch'an?", "Who is dragging a corpse?" etc.
However, many hua-t'ous have no relationship whatever to kung-ans, but are simply questions concerning Buddha-nature that either arise spontaneously, or are assigned by the master as a method of practice.
As we said, the use of the kung-an or hua-t'ou from previous records was not common until the Sung dynasty 宋朝, with the appearance of The Transmission of the Lamp 傳燈錄. This text contained many spontaneous kung-ans and hua-t'ous. Fen-yang Shan-chao 汾陽善昭 (947-1024) compiled a collection of 100 kung-ans, called Hsien-hsien ipai Chih 先賢一百則, One Hundred Selections from Previous Sages. Wu-men Hui-k'ai 無門 慧開(1183-1260) compiled a collection of 48 kung-ans, called Wu-men kuan 無門關(Mumonkan), the Gateless Gate. These all promoted and encouraged the use of kung-ans.