Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GPT-4 (5/24 version) indeed fails to solve the problem if not given careful prompting, though I am not convinced this is a new development. However, chain-of-thought resolves the issue. Both prompts and responses included below.

---

Failure

Q: How can you use a 4-minute hourglass and a 7-minute hourglass to measure 9 minutes?

A: Here's a way to measure exactly 9 minutes using a 4-minute hourglass and a 7-minute hourglass:

Start both hourglasses at the same time. When the 4-minute hourglass runs out, flip it over (4 minutes elapsed). When the 7-minute hourglass runs out, flip the 4-minute hourglass again (7 minutes elapsed). The 4-minute hourglass had 1 minute left when you flipped it, so it will run for an additional minute. When the 4-minute hourglass runs out this time, 2 additional minutes have passed (for a total of 9 minutes elapsed). So, you've just measured exactly 9 minutes using a 4-minute hourglass and a 7-minute hourglass.

---

Success

Q: How can you use a 4-minute hourglass and a 7-minute hourglass to measure 9 minutes? Please reason step-by-step. You are allowed to run preparatory steps beforehand if necessary.

A: The problem can be solved by using the following steps:

Preparatory Steps:

Start both hourglasses at the same time. When the 4-minute hourglass runs out, turn it over to start it again. (This marks 4 minutes.) When the 7-minute hourglass runs out, don't flip it yet, but note that the 4-minute hourglass has now been running for 3 minutes on its second run. (This marks 7 minutes.) When the 4-minute hourglass runs out again, flip the 7-minute hourglass. (This marks 8 minutes.)

Measurement Steps:

When the sand in the 7-minute hourglass runs out again, it will have been 1 minute since its flip, marking a total of 9 minutes. So, the process will be: 0-4 minutes: first run of the 4-minute hourglass 4-7 minutes: second run of the 4-minute hourglass until the 7-minute hourglass runs out 7-8 minutes: rest of the second run of the 4-minute hourglass 8-9 minutes: one minute of the 7-minute hourglass after flipping it when the 4-minute hourglass runs out the second time.

Thus, the total time measured is 9 minutes.



success is saying "eyeball the sand in the 7-minute hourglass and see when it looks like 1 minute worth?"


It's just missing a few steps: First, remove the end from the lower (still empty) half of 7-minute hourglass, causing it to drain its sand, while it runs. When the 7-minute hourglass runs out, do the same with the 4-minute hourglass (being on its second run). Flip the (now empty) 7-minute hourglass over and let the rest of the 4-minute hourglass drain into this. As the latter runs out, flip the 7-minute hourglass for 1 minute worth of accumulated sand (minus a few grains lost over handling procedures). ;-)


No, this is precisely correct. To simplify further:

1. Start H4 and H7

2. Flip H4 when it runs out (4-minute mark)

3. Flip H7 when it runs out (7-minute mark, 1 minute left on H4)

4. Flip H7 back when H4 runs out again (8-minute mark, 1 minute elapsed on H7)

5. When H7 runs out again (after 1 minute), exactly 9 minutes have passed


Your summary is incorrect. Step 3 doesn't match what GPT-4 actually said:

> When the 7-minute hourglass runs out, don't flip it yet, but note that the 4-minute hourglass has now been running for 3 minutes on its second run. (This marks 7 minutes.) When the 4-minute hourglass runs out again, flip the 7-minute hourglass. (This marks 8 minutes.)

Notice that GPT-4 says not to flip H7 when it runs out, which is a mistake.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: