
First order Logic!
Could anyone help me with this? (Headbang)
Donald and Daisy Duck took their nephews, age 4, 5, and 6, on an outing. Each boy wore a teeshirt with a different design on it and of a different color. You are also given the following information:
■ Huey is younger than the boy in the green teeshirt.
■ The 5yearold wore the teeshirt with the camel design.
■ Dewey’s teeshirt was yellow.
■ Louie’s teeshirt bore the giraffe design.
■ The panda design was not featured on the white teeshirt.
And,
Use the language containing the constants huey, dewey, louie, 4, 5, 6, green, yellow, white, camel, giraffe, and panda; the function symbols age/1, color/1, and design/1; and the predicate symbols Nephew/1, = /2 and < /2.
Questions:
(a) Represent these facts as sentences in FOL.
(b) Using your formalization, is it possible to conclude the age of each boy together with the color and design of the teeshirt he is wearing? Show semantically how you determined your answer.
(c) If your answer was “no,” indicate what further sentences you would need to add so that you could conclude the age of each boy together with the color and design of the teeshirt he is wearing.
Thank you(Headbang)

I don't know FOL, but hopefully I can help you solve the problem.
1 ■ Huey is younger than the boy in the green teeshirt.
2 ■ The 5yearold wore the teeshirt with the camel design.
3 ■ Dewey’s teeshirt was yellow.
4 ■ Louie’s teeshirt bore the giraffe design.
5 ■ The panda design was not featured on the white teeshirt.

Statement 1 implies Huey is not wearing a green shirt. Statement 3 implies he's not wearing the yellow shirt. Hence he's wearing the white shirt. Then 4 and 5 imply that Huey's shirt bore the camel design. Statement 2 implies that Huey is 5. Hence: Huey, 5, white, camel
By Statement 1, since Huey is younger than the boy in the green tshirt, this implies that the boy in the green shirt is 6. Hence by Statement 3, Louie is 6 and Dewey is 4. Hence: Louie, 6, green, giraffe. Dewey, 4, yellow, panda.
It's a bit confusing at first, but if you work it out you should be fine. A table can help as well.

I'll give my stab at translating the first sentence into FOL. I'll do an iterative approach to show what my thought process was in translation. I'll use MacstersUndead's numbering scheme as well.
1. (This is the main idea this statement is making. What remains is to translate "boy in the green Tshirt" into FOL. This is nontrivial. I may be breaking some of your FOL rules here, but hopefully I'll give you an idea of how it might be done.)
1. You'll notice that I'm sort of using a quantifiertype construction here, only without the quantifier. That's because I need to have a variable that is a boy, instead of merely asserting the existence of a boy, or saying something about all the boys. In mathematical notation, I'd probably use set builder notation to translate "boy in the green Tshirt" thus:
Finally, since I'm thinking that the notation of sets might not be available to you, I can rewrite one more time this way:
1. So in this expression, the only thing about which I'm unsure is whether I can use that type of expression to get at the value of You'll also note that I'm assuming the "color" function returns the color of its argument's Tshirt. If it didn't, we'd have to have another function that returned the Tshirt of its argument, so that you'd write it thus:
anytime you wanted the color of a Tshirt.
[EDIT]: To get rid of the problems above, actually USE a quantifier! Throw everything inside a quantifier statement thus:
So, retranslating this FOL sentence into English would go like this: for any x, if x is either Huey, Dewey, or Louie, and if x's Tshirt is green, then the age of Huey is less than the age of x.
I think that does it.

Thanks MacstersUndead, Ackbeet
That was really helful.
Following your comments, I tried to do part 'a', that is translating the sentences to FOL:
a)Representing facts as sentences in FOL.
(1) ∀x [(color (Shirt (x)) =green) → (age (huey) < age (x))]
(2) ∀x [(age(x) = 5) → (design, shirt(x)= camel)]
(3)Ex dewey(x) /\ shirt (x) = yellow
(4) Ey louie (y) /\ (design, shirt (y) = giraffe)
(5) Ex z(shirt) /\ white(color(z)) /\ (design (z) =/ panda)
Do you think these are correct? I suppose the are. Then I need to do the part B, which is to conclude age, color and design of each boy. Any idea? Thanks

I think MacstersUndead solution for second part is perfect.
Thanks.

Unless your universe of discourse is the set of the boys, none of your sentences work, because they don't restrict the possible objects over which the variable x can run. Are you sure you're allowed to introduce the Shirt function? In # 2, you should have (design(shirt(x))= camel). For #3, why not do simply Shirt(dewey) = yellow? You don't have to use quantifiers everywhere, necessarily. In addition, the way you've written it, dewey is now a predicate, which was not given in the beginning as one of the allowed predicates. I don't think your #5 has quite got it. You should only need one variable for that one.

Thanks Ackbeet, that was really helpful,
I made some changes, as:
(1) ∀x [(color (Shirt (x)) =green) → (age (huey) < age (x))]
(2) ∀x [(age(x) = 5) → (design (shirt(x))= camel)]
(3) Shirt(dewey) = yellow
(4) Ey louie (y) /\ (design, shirt (y) = giraffe)
(5)∀x [color(shirt(x)) = white > design(shirt(x)) =/ Panda]
what do you think about these? thanks

Whoops. Sorry. For (3), you're going to need this:
Color(Shirt(dewey)) = yellow.
For (4), do the same sort of thing as with 3:
design(Shirt(louie)) = giraffe
Everything else looks good.


You're welcome. Have a good one!