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.
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). ;-)
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.
---
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.