No, it's not recommended to pat a dog that you don't know. Always ask the owner's permission first and approach the dog slowly and calmly.