Skip to content

Instantly share code, notes, and snippets.

@przadka
Created February 1, 2025 16:22
Show Gist options
  • Save przadka/23506a6142f9d29cb25068ffdb669a63 to your computer and use it in GitHub Desktop.
Save przadka/23506a6142f9d29cb25068ffdb669a63 to your computer and use it in GitHub Desktop.
sonnet-jobs
<USER>
### 5. Four Friends
Anna, Bartosz, Cezary, and Danuta are four friends. Each of them is preparing for a specific profession: archaeologist, bookkeeper, carpenter, and dentist. It is known that Bartosz will be a dentist. Only one of these people is training for a profession that starts with the same letter as their name, and that person is **not** Anna.
**What professions did Anna and Danuta choose?**
<ASSISTANT>
Let me solve this step by step by identifying the given constraints and logical deductions.
Constraints from the puzzle:
* There are 4 friends: Anna, Bartosz, Cezary, and Danuta
* The 4 professions are: archaeologist, bookkeeper, carpenter, and dentist
* Bartosz will be a dentist
* Only one person's profession starts with the same letter as their name
* Anna's profession does NOT start with 'A'
Let's solve:
1. We know Bartosz is a dentist, so that profession is taken.
2. Only one person has a profession starting with their name's first letter, and it's not Anna. Looking at the remaining people:
* Cezary could be carpenter
* Danuta could be dentist (but we know Bartosz is the dentist)
* So Cezary must be the one whose profession starts with the same letter as their name - they must be the carpenter
3. Now we know:
* Bartosz → dentist
* Cezary → carpenter
* Anna → not archaeologist (given)
* Danuta → remaining profession
4. The remaining professions are:
* archaeologist
* bookkeeper
5. Since Anna cannot be an archaeologist, she must be the bookkeeper.
Therefore, Danuta must be the archaeologist.
Answer: Anna will be a bookkeeper, and Danuta will be an archaeologist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment