SlideShare a Scribd company logo
Puzzle | Two Brothers and
Facebook by tree
Hup university
6-2-2018
Puzzle
• Sahil and Ritik are brothers. One day they were discussing who is
smarter. But gradually the discussion turned into an argument.
Mother came and tried to handle the situation. She gave them a
problem to solve and the one who will solve the problem first,
would be considered smarter than the other. The problem is
• :
In a group of 6 people, you might find some people are friends on
Facebook, or you might find that no one is friend on Facebook. The
brothers are supposed to prove that there is always a group of 3
people where either :
•
–All3 people are mutual friends on Facebook.
• –All3 people are strangers (i.e, no one is friend on Facebook).
• Can you help the brothers to reach to the solution ?
Puzzle
• FACT:- 6 people {A,B,C,D,E,F}
• Rules:- X, Y, Z, N, M, P  {A,B,C,D,E,F}
• (friend(XYZ), not-friend(MNP))
• X YZ ≠ NMP.
• If (ch  friend ) then ch  not-friend
ch  {A,B,C,D,E,F}
• If (ch  not-friend ) then ch  friend
ch  {A,B,C,D,E,F}
A with {B, C, D,E, F}
A
(AB,CDEF)
(AC,BDEF)
(AD,BCEF)
(AE,BCDF)
(AF,BCDE)
1 2 3 4
AB with {C, D, E, F}
(AB,CDEF)
(ABC,DEF)
(ABD,CEF) (ABE,CDF)
(ABF,CDE)
1
( Friends, not Friends)
1 (ABC,DEF)
2 (ABD,CEF)
3 (ABE,CDF)
4 (ABF,CDE)
AC with { D, E, F}
(AC,BDEF)
(ACD,BEF) (ACE,BDF)
(ACF,BDE)
2
(friend, not friend)
1 (ABC,DEF)
2 (ABD,CEF)
3 (ABE,CDF)
4 (ABF,CDE)
5 (ACD,BEF)
6 (ACE,BDF)
7 (ACF,BDE)
AD with {E, F}
(AD,BCEF)
(ADE,BCF)
(ADF,CEF)
3
(friend, not friend)
1 (ABC,DEF)
2 (ABD,CEF)
3 (ABE,CDF)
4 (ABF,CDE)
5 (ACD,BEF)
6 (ACE,BDF)
7 (ACF,BDE)
8 (ADE,BCF)
9 (ADF,CEF)
AE with {F}
(AE,BCDF)
(AEF,BCD)
4
(friend, not friend)
1 (ABC,DEF)
2 (ABD,CEF)
3 (ABE,CDF)
4 (ABF,CDE)
5 (ACD,BEF)
6 (ACE,BDF)
7 (ACF,BDE)
8 (ADE,BCF)
9 (ADF,CEF)
10 (AEF,BCD)
B with {C, D,E, F}
B
(BC,ADEF)
(BD,ACEF)
(BE,ACDF)
(BF,ACDE)
1 2 3
BC with {D, E, F}
(BC,ADEF)
(BCD,AEF) (BCE,ADF)
(BCF,ADE)
1
(friend, not friend)
1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE)
5 (ACD,BEF), (ACE,BDF), (ACF,BDE)
8 (ADE,BCF), (ADF,CEF)
10 (AEF,BCD)
11 (BCD,AEF), (BCE,ADF), (BCF,ADE)
13
BD with {E, F}
(BD,ACDF)
(BDE,ACF)
(BDE,ACE)
2
(friend, not friend)
1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE)
5 (ACD,BEF), (ACE,BDF), (ACF,BDE)
8 (ADE,BCF), (ADF,CEF)
10 (AEF,BCD)
11 (BCD,AEF), (BCE,ADF), (BCF,ADE)
14 (BDE,ACF), (BDE,ACE)
16
BE with {F}
(BE,ACDF)
(BEF,ACD)
3
(friend, not friend)
1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE)
5 (ACD,BEF), (ACE,BDF), (ACF,BDE)
8 (ADE,BCF), (ADF,CEF)
10 (AEF,BCD)
11 (BCD,AEF), (BCE,ADF), (BCF,ADE)
14 (BDE,ACF), (BDE,ACE)
16 (BEF,ACD)
C with {D,E, F}
C
(CD,ABEF)
(CE,ABDF)
(CF,ABDE)
1 2
CD with {E,F}
(CD,ABEF)
(CDF,ABE)
1
(CDE,ABF)
(friend, not friend)
1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE)
5 (ACD,BEF), (ACE,BDF), (ACF,BDE)
8 (ADE,BCF), (ADF,CEF)
10 (AEF,BCD)
11 (BCD,AEF), (BCE,ADF), (BCF,ADE)
14 (BDE,ACF), (BDE,ACE)
16 (BEF,ACD)
17 (CDE,ABF), (CDF,ABE)
CE with {F}
(CE,ABDF)
(CEF,ABD)
2
(friend, not friend)
1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE)
5 (ACD,BEF), (ACE,BDF), (ACF,BDE)
8 (ADE,BCF), (ADF,CEF)
10 (AEF,BCD)
11 (BCD,AEF), (BCE,ADF), (BCF,ADE)
14 (BDE,ACF), (BDF,ACE)
16 (BEF,ACD)
17 (CDE,ABF), (CDF,ABE)
19 (CEF,ABD)
D with {E, F}
D
(DE,ABCF)
(DF,ABCE)

More Related Content

PPTX
Puzzle
zahraa F.Muhsen
 
PPTX
Predicate calculus up
Hywel Evans
 
PPS
Picture Puzzles
OH TEIK BIN
 
PPTX
Compute skillspowerpoint lect2
zahraa F.Muhsen
 
PPTX
Computer skills powerpoint intro
zahraa F.Muhsen
 
PPTX
Filter
zahraa F.Muhsen
 
PDF
Table
zahraa F.Muhsen
 
PPTX
List
zahraa F.Muhsen
 
Predicate calculus up
Hywel Evans
 
Picture Puzzles
OH TEIK BIN
 
Compute skillspowerpoint lect2
zahraa F.Muhsen
 
Computer skills powerpoint intro
zahraa F.Muhsen
 

More from zahraa F.Muhsen (20)

PPTX
Computer skills excel2010 5
zahraa F.Muhsen
 
PPTX
Computer skills excel2010 data
zahraa F.Muhsen
 
PPTX
Computer skills excel2010 2
zahraa F.Muhsen
 
PPTX
Computer skills excel2010
zahraa F.Muhsen
 
PPTX
Computer skills excel2010 3
zahraa F.Muhsen
 
PPTX
Computer skills excel2010-4
zahraa F.Muhsen
 
PDF
Computer skills excel2010
zahraa F.Muhsen
 
PPTX
Genetic algorithms
zahraa F.Muhsen
 
PPTX
Internet search techniques
zahraa F.Muhsen
 
PPTX
Nearest neighbor search
zahraa F.Muhsen
 
PPTX
Search methods
zahraa F.Muhsen
 
PPTX
Hash function
zahraa F.Muhsen
 
PPTX
Pigeonhole sort
zahraa F.Muhsen
 
PPTX
Gnome sort
zahraa F.Muhsen
 
PPTX
Puzzle (1000 coins and 10 bags)
zahraa F.Muhsen
 
PPTX
Php1
zahraa F.Muhsen
 
PPTX
Binary tree
zahraa F.Muhsen
 
PPTX
Selection sort
zahraa F.Muhsen
 
PPTX
Puzzle the neighbor
zahraa F.Muhsen
 
PPTX
Merge sort
zahraa F.Muhsen
 
Computer skills excel2010 5
zahraa F.Muhsen
 
Computer skills excel2010 data
zahraa F.Muhsen
 
Computer skills excel2010 2
zahraa F.Muhsen
 
Computer skills excel2010
zahraa F.Muhsen
 
Computer skills excel2010 3
zahraa F.Muhsen
 
Computer skills excel2010-4
zahraa F.Muhsen
 
Computer skills excel2010
zahraa F.Muhsen
 
Genetic algorithms
zahraa F.Muhsen
 
Internet search techniques
zahraa F.Muhsen
 
Nearest neighbor search
zahraa F.Muhsen
 
Search methods
zahraa F.Muhsen
 
Hash function
zahraa F.Muhsen
 
Pigeonhole sort
zahraa F.Muhsen
 
Gnome sort
zahraa F.Muhsen
 
Puzzle (1000 coins and 10 bags)
zahraa F.Muhsen
 
Binary tree
zahraa F.Muhsen
 
Selection sort
zahraa F.Muhsen
 
Puzzle the neighbor
zahraa F.Muhsen
 
Merge sort
zahraa F.Muhsen
 
Ad

Recently uploaded (20)

PPTX
Introduction to Data Analytics and Data Science
KavithaCIT
 
PPTX
Extract Transformation Load (3) (1).pptx
revathi148366
 
PPTX
Analysis of Employee_Attrition_Presentation.pptx
AdawuRedeemer
 
PPTX
Web dev -ppt that helps us understand web technology
shubhragoyal12
 
PDF
Chad Readey - An Independent Thinker
Chad Readey
 
PPTX
1intro to AI.pptx AI components & composition
ssuserb993e5
 
PPTX
Measurement of Afordability for Water Supply and Sanitation in Bangladesh .pptx
akmibrahimbd
 
PPTX
Presentation1.pptxvhhh. H ycycyyccycycvvv
ItratBatool16
 
PDF
CH2-MODEL-SETUP-v2017.1-JC-APR27-2017.pdf
jcc00023con
 
PDF
TCP_IP for Programmers ------ slides.pdf
Souhailsouhail5
 
PPTX
Economic Sector Performance Recovery.pptx
yulisbaso2020
 
PDF
Taxes Foundatisdcsdcsdon Certificate.pdf
PratyushPrem2
 
PPTX
Data-Driven Machine Learning for Rail Infrastructure Health Monitoring
Sione Palu
 
PDF
TIC ACTIVIDAD 1geeeeeeeeeeeeeeeeeeeeeeeeeeeeeer3.pdf
Thais Ruiz
 
PPTX
Purple and Violet Modern Marketing Presentation (1).pptx
SanthoshKumar229321
 
PDF
AI Lect 2 Identifying AI systems, branches of AI, etc.pdf
mswindow00
 
PPTX
Presentation (1) (1).pptx k8hhfftuiiigff
karthikjagath2005
 
PPTX
Logistic Regression ml machine learning.pptx
abdullahcocindia
 
PDF
345_IT infrastructure for business management.pdf
LEANHTRAN4
 
PDF
Data_Cleaning_Infographic_Series_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Introduction to Data Analytics and Data Science
KavithaCIT
 
Extract Transformation Load (3) (1).pptx
revathi148366
 
Analysis of Employee_Attrition_Presentation.pptx
AdawuRedeemer
 
Web dev -ppt that helps us understand web technology
shubhragoyal12
 
Chad Readey - An Independent Thinker
Chad Readey
 
1intro to AI.pptx AI components & composition
ssuserb993e5
 
Measurement of Afordability for Water Supply and Sanitation in Bangladesh .pptx
akmibrahimbd
 
Presentation1.pptxvhhh. H ycycyyccycycvvv
ItratBatool16
 
CH2-MODEL-SETUP-v2017.1-JC-APR27-2017.pdf
jcc00023con
 
TCP_IP for Programmers ------ slides.pdf
Souhailsouhail5
 
Economic Sector Performance Recovery.pptx
yulisbaso2020
 
Taxes Foundatisdcsdcsdon Certificate.pdf
PratyushPrem2
 
Data-Driven Machine Learning for Rail Infrastructure Health Monitoring
Sione Palu
 
TIC ACTIVIDAD 1geeeeeeeeeeeeeeeeeeeeeeeeeeeeeer3.pdf
Thais Ruiz
 
Purple and Violet Modern Marketing Presentation (1).pptx
SanthoshKumar229321
 
AI Lect 2 Identifying AI systems, branches of AI, etc.pdf
mswindow00
 
Presentation (1) (1).pptx k8hhfftuiiigff
karthikjagath2005
 
Logistic Regression ml machine learning.pptx
abdullahcocindia
 
345_IT infrastructure for business management.pdf
LEANHTRAN4
 
Data_Cleaning_Infographic_Series_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Ad

Puzzle two brother and facebook by tree

  • 1. Puzzle | Two Brothers and Facebook by tree Hup university 6-2-2018
  • 2. Puzzle • Sahil and Ritik are brothers. One day they were discussing who is smarter. But gradually the discussion turned into an argument. Mother came and tried to handle the situation. She gave them a problem to solve and the one who will solve the problem first, would be considered smarter than the other. The problem is • : In a group of 6 people, you might find some people are friends on Facebook, or you might find that no one is friend on Facebook. The brothers are supposed to prove that there is always a group of 3 people where either : • –All3 people are mutual friends on Facebook. • –All3 people are strangers (i.e, no one is friend on Facebook). • Can you help the brothers to reach to the solution ?
  • 3. Puzzle • FACT:- 6 people {A,B,C,D,E,F} • Rules:- X, Y, Z, N, M, P  {A,B,C,D,E,F} • (friend(XYZ), not-friend(MNP)) • X YZ ≠ NMP. • If (ch  friend ) then ch  not-friend ch  {A,B,C,D,E,F} • If (ch  not-friend ) then ch  friend ch  {A,B,C,D,E,F}
  • 4. A with {B, C, D,E, F} A (AB,CDEF) (AC,BDEF) (AD,BCEF) (AE,BCDF) (AF,BCDE) 1 2 3 4
  • 5. AB with {C, D, E, F} (AB,CDEF) (ABC,DEF) (ABD,CEF) (ABE,CDF) (ABF,CDE) 1
  • 6. ( Friends, not Friends) 1 (ABC,DEF) 2 (ABD,CEF) 3 (ABE,CDF) 4 (ABF,CDE)
  • 7. AC with { D, E, F} (AC,BDEF) (ACD,BEF) (ACE,BDF) (ACF,BDE) 2
  • 8. (friend, not friend) 1 (ABC,DEF) 2 (ABD,CEF) 3 (ABE,CDF) 4 (ABF,CDE) 5 (ACD,BEF) 6 (ACE,BDF) 7 (ACF,BDE)
  • 9. AD with {E, F} (AD,BCEF) (ADE,BCF) (ADF,CEF) 3
  • 10. (friend, not friend) 1 (ABC,DEF) 2 (ABD,CEF) 3 (ABE,CDF) 4 (ABF,CDE) 5 (ACD,BEF) 6 (ACE,BDF) 7 (ACF,BDE) 8 (ADE,BCF) 9 (ADF,CEF)
  • 12. (friend, not friend) 1 (ABC,DEF) 2 (ABD,CEF) 3 (ABE,CDF) 4 (ABF,CDE) 5 (ACD,BEF) 6 (ACE,BDF) 7 (ACF,BDE) 8 (ADE,BCF) 9 (ADF,CEF) 10 (AEF,BCD)
  • 13. B with {C, D,E, F} B (BC,ADEF) (BD,ACEF) (BE,ACDF) (BF,ACDE) 1 2 3
  • 14. BC with {D, E, F} (BC,ADEF) (BCD,AEF) (BCE,ADF) (BCF,ADE) 1
  • 15. (friend, not friend) 1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE) 5 (ACD,BEF), (ACE,BDF), (ACF,BDE) 8 (ADE,BCF), (ADF,CEF) 10 (AEF,BCD) 11 (BCD,AEF), (BCE,ADF), (BCF,ADE) 13
  • 16. BD with {E, F} (BD,ACDF) (BDE,ACF) (BDE,ACE) 2
  • 17. (friend, not friend) 1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE) 5 (ACD,BEF), (ACE,BDF), (ACF,BDE) 8 (ADE,BCF), (ADF,CEF) 10 (AEF,BCD) 11 (BCD,AEF), (BCE,ADF), (BCF,ADE) 14 (BDE,ACF), (BDE,ACE) 16
  • 19. (friend, not friend) 1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE) 5 (ACD,BEF), (ACE,BDF), (ACF,BDE) 8 (ADE,BCF), (ADF,CEF) 10 (AEF,BCD) 11 (BCD,AEF), (BCE,ADF), (BCF,ADE) 14 (BDE,ACF), (BDE,ACE) 16 (BEF,ACD)
  • 20. C with {D,E, F} C (CD,ABEF) (CE,ABDF) (CF,ABDE) 1 2
  • 22. (friend, not friend) 1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE) 5 (ACD,BEF), (ACE,BDF), (ACF,BDE) 8 (ADE,BCF), (ADF,CEF) 10 (AEF,BCD) 11 (BCD,AEF), (BCE,ADF), (BCF,ADE) 14 (BDE,ACF), (BDE,ACE) 16 (BEF,ACD) 17 (CDE,ABF), (CDF,ABE)
  • 24. (friend, not friend) 1 (ABC,DEF), (ABD,CEF), (ABE,CDF), (ABF,CDE) 5 (ACD,BEF), (ACE,BDF), (ACF,BDE) 8 (ADE,BCF), (ADF,CEF) 10 (AEF,BCD) 11 (BCD,AEF), (BCE,ADF), (BCF,ADE) 14 (BDE,ACF), (BDF,ACE) 16 (BEF,ACD) 17 (CDE,ABF), (CDF,ABE) 19 (CEF,ABD)
  • 25. D with {E, F} D (DE,ABCF) (DF,ABCE)