Skip to content

Instantly share code, notes, and snippets.

@przadka
Created February 1, 2025 16:46
Show Gist options
  • Save przadka/993926bc3e47fb1374a5eaedd6b1a2a8 to your computer and use it in GitHub Desktop.
Save przadka/993926bc3e47fb1374a5eaedd6b1a2a8 to your computer and use it in GitHub Desktop.
flash-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>
Here's how we can solve this logic puzzle:
1. **Bartosz is a dentist:** This is our starting point.
2. **Only one person's profession starts with the same letter as their name:** We know this person isn't Anna.
3. **Consider the initial letters:**
* Anna: A
* Bartosz: B
* Cezary: C
* Danuta: D
* Archaeologist: A
* Bookkeeper: B
* Carpenter: C
* Dentist: D
4. **Eliminate matches:** Since only one person's profession matches their name's initial letter, and it's not Anna, we can eliminate the following:
* Anna cannot be an archaeologist.
* Bartosz is already a dentist.
* Cezary cannot be a carpenter.
* Danuta cannot be a dentist.
5. **Consider Bartosz again:** Since Bartosz is a dentist, and only one person's profession starts with the same letter as their name, no one else can have a profession that starts with the same letter as their name.
6. **Deduce Danuta's profession:** Danuta cannot be a dentist. Since Anna can't be an archaeologist, and Cezary can't be a carpenter, the only remaining option for Danuta must be archaeologist.
7. **Deduce Anna's profession:** Since Bartosz is a dentist, Danuta is an archaeologist, and Cezary cannot be a carpenter, Anna must be a carpenter.
8. **Deduce Cezary's profession:** The only remaining profession is bookkeeper, so Cezary must be a bookkeeper.
**Therefore:**
* **Anna is training to be a carpenter.**
* **Danuta is training to be an archaeologist.**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment