Exactly one of Mr. Jankowski, Mrs. Jankowski, their son Nate, and their daughter Mabel is a butcher.
Five facts relating to their occupation are furnished hereunder as follows:
- If the butcher and the baker belong to the same sex, then the baker is older than the butcher.
- There is exactly one butcher and one baker.
- If neither the butcher nor the baker is the parent of the other, then the butcher is older than the baker.
- If the butcher is a man, then he and the baker are the same age.
- If the butcher and the baker belong to the opposite sex, then the man is older than the woman.
Whose occupation can be determined with certainty? Provide valid reasoning for your conclusion.
I did first solve the problem with a computer code, which I then :-) ignored and concluded the wrong answer with
mistaken logic. I should have checked with the code....
father age= 4 baker
mother age= 4
son age= 4
daughter age= 3 butcher
father age= 1
mother age= 2 baker
son age= 1
daughter age= 1 butcher
character rol(4)*8, job(3)*7
data rol/'father','mother','son','daughter'/,job/'butcher','baker',' '/
c (i,*): i=1,2,3,4 role: father, mother, son, daughter
c (*,1): =1,2,3,4 age: any of 4 relative possibilities
c (*,2): =1,2,3 job: butcher, baker, none
f(4,2)=1 ! daughter is butcher
do fambak=1,3 ! who is the baker?
f(fambak,2)=2 ! ** 2 ** there is now a baker, and it is not Mabel
do 1 ages=1,4
if(bak.eq.2.and.f(2,1).le.f(4,1))go to 1 ! ** 1 **
if(bak.eq.3.and.f(4,1).le.f(3,1))go to 1 ! ** 3 **
c ** 4 ** is false already
if((bak.eq.1.or.bak.eq.3).and.f(bak,1).le.f(4,1)) go to 1 ! ** 5 **