I'm not sure I understand exactly. Are you asking how to set up the data? Or how to get Tableau to recognize cat owners, dog owners OR cat and dog owners? If it's the latter, a calculated field similar to the following can be created:
if [owner]='y' then 'dog'
elseif [owner]='n' then 'cat'
elseif [owner]='y' and [owner]='n' then 'both' end
Hope this helps!