I think that problem is quite well-known.I analyzed Bob a bit.
As the post is lengthy, the conclusion first: Bob did not ruin the puzzle. For all possible number combinations, Carol has a way to allow the puzzle to be solved. She might need nested logic statements, however.
Given some hat distribution (here: A=6, B=7, C=8), the 3 have to make sure that they can find their number after the 3 possible statements are made.
This does not limit Amy's options - she can say anything, and Bob and Carol can reveal all hats in their statements.
Amy chooses "Carol's number is greater than Bob's".
This rules out C=1 and B=9, of course.
As Bob does not raise his hand, Carol knows that she does not have 2. At the same time, Bob cannot have 8 for the same reason. This is common knowledge now.
Bob sees the hats of Amy and Carol, therefore he knows A=6, C=8, and B<8.
In particular, let's look at the following case (possible according to Bob's knowledge):
A=6, C=8, and B=1
Bobs statement: "The sum of Amy's and Carol's numbers is even."
Consider their knowledge in that case:
Carol: A=6, B=1, C=4 or 8
Amy: B=1, C=8, A=2,4 or 6
Bob: A=6, C=8, B<8
"Even numbers for Carol and Amy" is common knowledge (as they all see at least one of the hats).
Carol's statement itself does not add knowledge to Carol, she needs some way to distinguish between 2,4 and 8 based on the reaction of Amy and Bob. As they are not allowed to communicate ("Your number is 6, raise your hand quickly if my number is 2 and slowly otherwise"), Carol's statement has to be quite tricky - and at the same time, it has to allow Amy and Bob to find their numbers. Oh, this is a problematic meta-analysis - not analyzing a specific puzzle, but the space of all possible puzzles.
Approach:
C: "A>5 and B=1"
This allows Bob to know his number, of course.
- case C=8: Amy would know A=6 and raise her hand, this allows Carol to know she has 8
- case C=4, Amy would be unsure, and Carol can use this to conclude C=4. This does not help Amy, however.
Fix:
C: "[[A=4 and B=1] or A=6] and [B=4 or B=1]"
Carol knows that Amy evaluates this as "A=4 or A=6".
Carol knows that Bob evaluates this as "B=4 or B=1".
Therefore:
- if C=4, Amy knows A=6, and Carol concludes C=4. Bob knows B=1, the puzzle is solved.
- if C=8:
--- Amy is unsure, which gives C=8 for Carol.
--- Bob is unsure.
----- Amy sees that Bob is unsure - if she would have 4, Bob would know B=1. Therefore, Amy knows A=6 after watching that Bob is unsure.
----- At the same time, Bob sees that Amy is unsure - if B=4, Amy would know A=6 immediately. Therefore, Bob can conclude B=1. Puzzle solved.
To summarize:
Bob knows that, if A=6, C=8, and B=1, Carol can allow to solve the puzzle.
Now we have to check this for all other cases of B as well...
And we expect that Bob does everything in his head before he decides which statement to use :D.
Some easy cases:
A=6, C=8, and B=7
This is the setup of the initial puzzle, and it is solvable without an additional statement of Carol.
A=6, C=8, and B=6
Impossible
A=6, C=8, and B=5
Carol knows she has 8, and can reveal A=6, B=5 to solve the puzzle.
A=6, C=8, and B=4
Carol knows she has 8, and can reveal A=6, B=4 to solve the puzzle.
A=6, C=8, and B=3
Works in the same way as B=1:
Carol knows she has 4 or 8.
C: "[[A=4 and B=3] or A=6] and [B=4 or B=3]"
Carol knows that Amy evaluates this as "A=4 or A=6".
Carol knows that Bob evaluates this as "B=4 or B=3".
Therefore:
- if C=4, Amy knows A=6, and Carol concludes C=4. Bob knows B=3, the puzzle is solved.
- if C=8:
--- Amy is unsure, which gives C=8 for Carol.
--- Bob is unsure.
----- Amy sees that Bob is unsure - if she would have 4, Bob would know B=3. Therefore, Amy knows A=6 after watching that Bob is unsure.
----- At the same time, Bob sees that Amy is unsure - if B=4, Amy would know A=6 immediately. Therefore, Bob can conclude B=3. Puzzle solved.
A=6, C=8, and B=2:
Works in the same way as B=1:
Carol knows she has 4 or 8.
C: "[[A=4 and B=2] or A=6] and [B=4 or B=2]"
Carol knows that Amy evaluates this as "A=4 or A=6".
Carol knows that Bob evaluates this as "B=4 or B=2".
Therefore:
- if C=4, Amy knows A=6, and Carol concludes C=4. Bob knows B=2, the puzzle is solved.
- if C=8:
--- Amy is unsure, which gives C=8 for Carol.
--- Bob is unsure.
----- Amy sees that Bob is unsure - if she would have 4, Bob would know B=3. Therefore, Amy knows A=6 after watching that Bob is unsure.
----- At the same time, Bob sees that Amy is unsure - if B=4, Amy would know A=6 immediately. Therefore, Bob can conclude B=3. Puzzle solved.