Logic puzzle: students, cities, subjects and grades.

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
Casual
Messages
6
Reaction score
0
This exercise is from my Discrete Mathematics course and it requires a step by step solution, backed up by logical equivalences or deductions made based on the rules of logic.

5 students, Oliver, Simon, Peter, Bob and Christie all seniors at Harvard, come from one of the following cities: Oregon, Seattle, Phoenix, Boston and Chicago. In the last semester, everyone picked a different subject and got a different grade. The grades were 10,9,8,7,6 and the subjects were Calculus, Computer Science, Biology, Physics and Spanish.
It is known that:None of the students come from the cities with the same first letter as their names, and there is only one student who's subject starts with the same first letter as his name.
Bob took the Spanish course and got a 7.
The professors that teach the subjects starting with the letter 'C', gave neither the smallest nor biggest grade for their course, but if anyone gave an 8, then it was the Computer Science teacher.
Simon's friend from Oregon got a grade that's greater than Simon's one, by 2 and that grade is a 9 only if Simon took the Physics course.
Peter is taking neither the Biology nor Physics course, and he comes from a city that has exactly one 'o' in its name.
The student from Phoenix took the Computer Science course if and only if the students from Seattle took the Biology course.Find out the respective cities, subjects and grades for all the students listed.

I have no idea how to go at this thing. I can always get an excel worksheet and find the solution through a process of elimination, but that's not something my teacher would accept... Could any of you guys help me get started?
 
Physics news on Phys.org
Casual said:
I have no idea how to go at this thing. I can always get an excel worksheet and find the solution through a process of elimination, but that's not something my teacher would accept... Could any of you guys help me get started?
I'll get you started:
In our universe, there are 5 sets, 5 students, 5 cities, 5 grades, and 5 classes. Each of the 5 sets contains 4 elements, a student, a city, a grade, and a class.

0.1) No element is share among the five sets.

1) None of the students come from the cities with the same first letter as their names
1.1) Set with Student O may only have City S, P, B, or C
1.2) Set with Student S may only have City O, P, B, or C
1.3) Set with Student P may only have City O, S, B, or C
1.4) Set with Student B may only have City O, S, P, or C
1.5) Set with Student C may only have City O, S, P, or B

2) there is only one student who's subject starts with the same first letter as his name.

3) Bob took the Spanish course and got a 7.

4) The professors that teach the subjects starting with the letter 'C', gave neither the smallest nor biggest grade for their course
4.1) Set with course C may only have grade 9, 8, 7
4.2) Set with course CS may only have grade 9, 8, 7

5) but if anyone gave an 8, then it was the Computer Science teacher.
5.1) "anyone gave an 8" is true, thus Set with course CS may only have grade 8.
Combining statements 0.1, 4.1, and 5.1 we have:
5.2) Set with course C may only have grade 9 or 7.

6) Simon's friend from Oregon got a grade that's greater than Simon's [grade], by 2
6.1) Set with Student S may only have grade 6, 7, or 8

7) [Simon's grade] is a 9 only if Simon took the Physics course.
Combining 6.1 and 7:
7.1) Set with Student S may only have: Course C, CS, B, or S with grade 7, 8; or Course P with grade 9.

8) Simon took the Physics course.
Combining 7.1 and 8:
8.1) Set with Student S may only have Course P with grade 9.
Combining 0.1, 4.1, and 8.1 (Courses C and P are different sets):
8.2) Set with course C may only have grade 8 or 7
Combining 0.1, 4.1, and 8.1 (Courses CS and P are different sets):
8.3) Set with course CS may only have grade 8 or 7
Combining 8.1, 8.2, and 8.3, we have accounted for 3 sets that have the grades 7, 8, and 9 and courses C, CS, and P. Thus the remaining two courses must match the remaining two grades:
8.4) Set with Course B may only have grade 6 or 10.
8.5) Set with Course S may only have grade 6 or 10.

9) Peter is taking neither the Biology nor Physics course
9.1) Set with Student P may only have Course C, CS, or S

10) and he [Peter] comes from a city that has exactly one 'o' in its name.
10.1) Set with Student P may only have City P or C.

11) The student from Phoenix took the Computer Science course if and only if the students from Seattle took the Biology course.

... consider yourself "started".
 
Last edited:
Reply
  • Like
Likes   Reactions: Greg Bernhardt