Open In App
Related Articles

Puzzle | God’s Mercy Graduation

Improve Article
Save Article
Like Article

There is a school on the foothills of Himalayas. This Gurukul admits only 100 students every year and these are entitled to be the best in knowledge, health and spirit. A specialty about this Gurukul is that, despite being a secret well hidden from the muggles (non-sorcerers), it’s a renowned institution and well known amongst sorcerers and priests. The school is famous in these communities for “God’s Mercy Graduation”. It is believed that every year there comes a time, starting in the second week of November, when the skies turn red and there are exactly 100 days left to graduation. It’s an overly tensed time for the students of the institution. All students are preparing for the world’s toughest and the most rigorous examination. God comes one night and puts a seal at the back of the head of some meritorious students and these students are exempted from giving the examination and have to leave the school.


  • At least one student is always marked and this fact is known to the students.
  • No student has the ability to touch and find out whether they have been marked or not. A student can see the heads of all other students except his own.
  • No student is allowed to communicate by any means (verbal/non-verbal) with another student telling him or giving him hints regarding God’s mark.

On the 23rd day (from the night God had visited), some students leave the school as they have been blessed by God and don’t need to give the examination. Find out how many students remain in the institution?

Note: Initially there were 100 students only.

Solution: 77
Since no student is allowed to communicate and is unable to know about himself, it can inferred that irrespective of whether he himself is marked or not, each student can only get to know about all other students who are marked (by looking at the back of all 99 heads except her own).
Assume only 2 students were marked (answer: 98 how?)
On the first day after God had visited, everyone comes to school and looks at the back of the head of every other student. Let A and B be the children who were marked.
Day 1: A saw 98 unmarked heads and 1 marked head. Still A has no knowledge whether his head was marked or not.
B also saw 98 unmarked heads and 1 marked head on day 1. Still B has no knowledge whether his head was marked or not.
Day 2: A notices that B has still has not left. [98 + A + B = 100]. B notices that A has not left.
So, A sees again on day 2, 98 unmarked heads and one marked head of B, he infers since B has not left, B must have seen 1 marked head on the day 1 (since A knows 98 heads are unmarked and B’s head is marked ). So one head that he doesn’t know about i.e. his own head is being seen by B on day 1 as a marked head.
Therefore, A realizes that along with B, it’s his head that is marked. Same observation can be made from B’s point of view. (Where B realizes that apart from A, his own head is marked). So as a result on day 2 both A and B will leave and 98 students will be left.
Generalization: On nth day, n students realize that apart from n-1 marked heads, their own head is marked and so on nth day, n students leave the school.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 18 Jan, 2023
Like Article
Save Article
Similar Reads