A Microsoft logical interview

Source: Internet
Author: User


Mr. James and Mr. Xiaoqiang are both students of Mr. Wang. Their birthdate is M month N. They all know that the teacher's birthday is one of the following ten groups. The teacher told James about M, I told Xiao Qiang about N and asked them if they knew their birthday. Xiao Ming said, "if I don't know Xiao Qiang, I don't know, after you say this, I will know, "said James." Then I will know ". Ask the instructor Which of the following is his birthday.

I am working at orz.... I accidentally saw a question. Just move your mind.
By month:
3, 4, 3, 5, 3, 8
6, 4, 6, 7
9,1 9,5

By date:

12, 2
3, 4, 6, 4
3,5 9,5
6, 7

James said, "if I don't know Xiaoqiang, I don't know." James certainly doesn't know by month. James knows that Xiaoqiang does not know after the month. Because the dates of, and 7 are unique, it can be seen that the month is not June or December, And the birthday may be the following five:
By month:
3, 4, 3, 5, 3, 8
9,1 9,5
Xiaoqiang said, "I didn't know, but I knew what you said." In addition to and, Xiaoqiang's original choice is as follows,
By date:

3, 4, 6, 4
3,5 9,5

Now, after listening to James's words, excluding the data for June and June December, the possible date of the teacher's birthday is as follows:
By date:
9,1
3, 4
3,5 9,5
3, 8
Now Xiaoqiang knows that due to the repetition of dates 3, 5, 9, and 5, the date must not be 5. The possible set of birthdays is: 3, 4, 8, 9, and 1.

James said, "Now I know." James may have chosen the following options,
By month:
3, 4, 3, 5, 3, 8, www.2cto.com
9,1 9,5
Now, James uses Xiaoqiang's logic to infer that the date must not be 5, but James knows the month. If it is March, James cannot know the teacher's birthday, so it can only be September,
The instructor's birthday is 9,1.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.