Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@Hao By the way, do you mind editing this post by giving a link/reference to the construction/search? If it was done by exhaustive search, $13$ must be the upper bound you asked, too. If you don't feel like it, you can just a link or reference as a comment; I'll edit this post when I have the time.
@HaoCHEN You mean PHF$(6;13,3,3)$, right? Thant's nice! I checked your 13 columns, too. It looks like a valid one, well, unless my programming sucks too hard!
@HaoCHEN It is optimal in the sense that no PHF$(5;12,3,3)$ exists, i.e., you need at least $6$ rows to have $12$ columns with the all-distinct-symbol property. But I need to check the existing literature or prove it myself to see if it's optimal in your sense. I'm pretty sure it's the best among known PHF$(6;\vert C\vert,3,3)$, though. I'll edit my post if I find the answer to the optimality. Or you can prove it and improve this post, too!