Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Quantitiative Aptitude
  • Logical Reasoning
  • Verbal Ability
  • Aptitude Quiz
  • Quantitiative Aptitude Quiz
  • Verbal Ability Quiz
  • Aptitude For Placements
  • Interview Corner
  • Practice Sets
Open In App
Next Article:
Puzzle | 9 Students and Red Black Hats
Next article icon

Puzzle | 9 Students and Red Black Hats

Last Updated : 18 Jan, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report
Puzzle: There are 9 IITians in a classroom. A professor enters the room with a bag. He says to them that there are 9 hats inside the bag. The hats are either of red colour or black colour. Further instruction was provided that there is at least one red hat and the number of black hats is greater than that of the red ones. The professor puts the hats on each of the students head and instructs them to find the number of red and black hats. The students are not allowed to look on their own hats or talk to each other or make any sort of communications or any tricks. The professor leaves and returns after 20 minutes looking for the answer, but no answer was provided. He again leaves and gives them an extra 10 minutes to come up with an answer but still, no response was received. He finally gives them the last 5 minutes to figure out the answer and leaves. This time when he returns, everyone was able to come up with the correct answer. Our task is to find what could have been the correct answer and how they came up with it. Solution: The solution can be derived using the logical process of assumptions and conclusions divided into three parts. After the first 20 minutes: Let's assume that there are one red hat and 8 black hats. Now the student with the red hat would have been able to see the 8 other black hats. But since no answer was given after 20 minutes, then this assumption is wrong. Hence the combination of 1 red hat and 8 black hats are wrong. After the next 10 minutes: Let's assume that there are 2 red hats and 7 black hats. Now each student with a red hat can see the other 7 black hats and 1 red hat. Therefore he knows that since the first assumption was wrong, he must be wearing a red hat. But since no answer was provided, the assumption of 2 red hats and 7 black hats is also wrong. The final interval of 5 minutes: Let's assume that there are 3 red hats and 6 black hats. Every student with a red hat on them is able to see the other 6 black hats and two red hats. Therefore he knows that since the first two assumptions were wrong, he must be wearing a red hat. Since this is the last chance, and the answer provided by them was correct, this assumption is logically valid and true. So there are 3 red hats and 6 black hats. Though we got the correct combination, how come everybody came up with the correct answer including the holder of black hats, since only the 3 red hat ones knew the answer. A layman's approach would tell us that since it was the last chance for them to answer, then the professor might have been expecting an answer on the third interval or 3rd chance of assumptions.

Next Article
Puzzle | 9 Students and Red Black Hats

C

chinmoy lenka
Improve
Article Tags :
  • Aptitude
  • Logical Puzzles
  • Aptitude-Puzzles
  • Puzzles
Practice Tags :
  • Puzzles

Similar Reads

    Puzzle 47 | Red Hat vs Blue Hat
    A team of three people decide on a strategy for playing the following game. Each player walks into a room. On the way in, a fair coin is tossed for each player, deciding that player’s hat color, either red or blue. Each player can see the hat colors of the other two players, but cannot see her own h
    3 min read
    Puzzle 13 | (100 Prisoners with Red/Black Hats)
    100 prisoners in jail are standing in a queue facing in one direction. Each prisoner is wearing a hat of color either black or red. A prisoner can see hats of all prisoners in front of him in the queue, but cannot see his hat and hats of prisoners standing behind him. The jailer is going to ask colo
    3 min read
    Puzzle - 3 Hats in a Circle
    Puzzle: Placed in a room without mirrors are three males who are not wearing glasses. They are each given a headgear that they are unable to see. The color of the hat is either red or green. They are not permitted to look at their own hats in any way, and they are not allowed to speak or interact wi
    3 min read
    What are Mathematical Puzzles and How to solve them?
    A mathematical puzzle is a type of problem or game that involves using mathematical concepts, logic, and reasoning to find a solution. These puzzles often require creative thinking and a deep understanding of mathematical principles to solve. They can range from simple arithmetic puzzles to complex
    3 min read
    Analytical Puzzle with Solution
    Train Compartment PuzzleA train has 11 compartments. In any three consecutive compartments, there are exactly 84 people. If there are 321 people in total, how many people are in the 9th compartment? Train Compartment Puzzle Solution:15 people Explanation :Let c1,c2,c3..........cn be the compartment
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences