SlideShare a Scribd company logo
1 of 11
Puzzle | Two Brothers and
Facebook
Hup university
5-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 ?
Analyses
• Fact:-6 people, (A,B,C,D,E,F)
• Rules
1-people are friends
2-no one is friend
• Goal
– The brothers are supposed to prove that there is
always a group of 3 people where either :
– All3 people are friends
– All3 people are strangers
Set A:-ABC, ABD, ABE, ABF, ACD, ACE,
ACF, ADE, ADF, AEF
A
AE AF
ABC
ABD
ABE
ABF
AB
ACD
ACE
ACF
AC
ADE
ADF
AD
AEF
Relation of A
{A} with {B, C,D,E,F}
If the new child is not a child
on old father , if it is delete
the new child
{AB} with {C,D,E,F}
{AC} with {D,E,F}
{AD} with {E,F}
{AE} with {F}
{BE} with {F}
{BD} with {E,F}
Relation of B
B
BE BF
BCD
BCE
BCF
BC
BDE
BDF
BD
BEF
Set B:-BCD, BCE, BCF, BDE, BDF, BEF
{B} with {C,D,E,F}
If the new child is not a child
on old father , if it is delete
the new child
{BC} with {D,E,F}
Relation of C
C
CE CF
CDE
CDF
CD
CEF
Set C:-CDE, CDF, CEF
{C} with {D,E,F}
If the new child is not a child
on old father , if it is delete
the new child
{CD} with {E,F}
{CE} with {F}
Relation of D
D
DE DF
DEF
Set D:-DEF
{D} with {E,F}
If the new child is not a child
on old father , if it is delete
the new child
{DE} with {F}
3
friends
3
none
6 PEOPLE
1 ABC DEF A B C D E F
2 ABD CEF A B C D E F
3 ABE CDF A B C D E F
4 ABF CDE A B C D E F
5 ACD BEF A B C D E F
6 ACE BDF A B C D E F
7 ACF BDE A B C D E F
8 ADE BCF A B C D E F
9 ADF BCE A B C D E F
10 BCD AEF A B C D E F
11 BCE ADF A B C D E F
12 BCF ADE A B C D E F
13 BDE ACF A B C D E F
14 BDF ACE A B C D E F
15 BEF ACD A B C D E F
3
friends
3
none
6 PEOPLE
16 CDE ABF ABCDEF
17 CDF ABE ABCDEF
18 CEF ABD ABCDEF
19 DEF ABC ABCDEF
Steps
• Start with {A} friends with {B,C,D,E,F}
• Each two friend {AB, AC, AD, AE,AF} will be a
friend with {B, C, D, E, F}, delete repeated
friends.
• Next, start with {B} friends with {C,D,E,F},
• A is not in the set because of the repetition
• Each two friend {BC,BD,BE,BF} will be a friend
with {C, D,E, F} (A & B is not in the set of
repetition)
steps
• Next, start with {C} friends with {D,E,F},
• A&B is not in the set because of the repetition
• Each two friend {CD, CE, CF} will be a friend
with {D,E, F} (A, B & C is not in the set of
repetition) .
• Every new child will be check with the
previous explored child because of the
repetition.
Steps
• Next, start with {D} friends with {E,F},
• A,B,C is not in the set because of the
repetition
• Each two friend {DE,DF} will be a friend with
{E, F} (A B C D is not in the set)

More Related Content

More from zahraa F.Muhsen (20)

Computer skills excel2010
Computer skills excel2010Computer skills excel2010
Computer skills excel2010
 
Computer skills excel2010 3
Computer skills excel2010 3Computer skills excel2010 3
Computer skills excel2010 3
 
Computer skills excel2010-4
Computer skills excel2010-4Computer skills excel2010-4
Computer skills excel2010-4
 
Computer skills excel2010
Computer skills excel2010Computer skills excel2010
Computer skills excel2010
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Internet search techniques
Internet search techniquesInternet search techniques
Internet search techniques
 
Nearest neighbor search
Nearest neighbor searchNearest neighbor search
Nearest neighbor search
 
Search methods
Search methodsSearch methods
Search methods
 
Hash function
Hash functionHash function
Hash function
 
Pigeonhole sort
Pigeonhole sortPigeonhole sort
Pigeonhole sort
 
Gnome sort
Gnome sortGnome sort
Gnome sort
 
Puzzle (1000 coins and 10 bags)
Puzzle (1000 coins and 10 bags)Puzzle (1000 coins and 10 bags)
Puzzle (1000 coins and 10 bags)
 
Php1
Php1Php1
Php1
 
Binary tree
Binary treeBinary tree
Binary tree
 
Selection sort
Selection sortSelection sort
Selection sort
 
Puzzle the neighbor
Puzzle the neighborPuzzle the neighbor
Puzzle the neighbor
 
Merge sort
Merge sortMerge sort
Merge sort
 
Puzzle fastest 3 horses
Puzzle fastest 3 horsesPuzzle fastest 3 horses
Puzzle fastest 3 horses
 
Counting sort
Counting sortCounting sort
Counting sort
 
Radix sort
Radix sortRadix sort
Radix sort
 

Recently uploaded

What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationmuqadasqasim10
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives23050636
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证pwgnohujw
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token PredictionNABLAS株式会社
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshareraiaryan448
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一fztigerwe
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsBrainSell Technologies
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...BabaJohn3
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证a8om7o51
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeBoston Institute of Analytics
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024patrickdtherriault
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxStephen266013
 
The Significance of Transliteration Enhancing
The Significance of Transliteration EnhancingThe Significance of Transliteration Enhancing
The Significance of Transliteration Enhancingmohamed Elzalabany
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfgreat91
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样jk0tkvfv
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...ThinkInnovation
 
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksSensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksBoston Institute of Analytics
 
Digital Marketing Demystified: Expert Tips from Samantha Rae Coolbeth
Digital Marketing Demystified: Expert Tips from Samantha Rae CoolbethDigital Marketing Demystified: Expert Tips from Samantha Rae Coolbeth
Digital Marketing Demystified: Expert Tips from Samantha Rae CoolbethSamantha Rae Coolbeth
 
Data Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster AnalysisData Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster AnalysisBoston Institute of Analytics
 

Recently uploaded (20)

What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic information
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshare
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data Analytics
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
 
The Significance of Transliteration Enhancing
The Significance of Transliteration EnhancingThe Significance of Transliteration Enhancing
The Significance of Transliteration Enhancing
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksSensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
 
Digital Marketing Demystified: Expert Tips from Samantha Rae Coolbeth
Digital Marketing Demystified: Expert Tips from Samantha Rae CoolbethDigital Marketing Demystified: Expert Tips from Samantha Rae Coolbeth
Digital Marketing Demystified: Expert Tips from Samantha Rae Coolbeth
 
Data Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster AnalysisData Analysis Project Presentation : NYC Shooting Cluster Analysis
Data Analysis Project Presentation : NYC Shooting Cluster Analysis
 

Puzzle

  • 1. Puzzle | Two Brothers and Facebook Hup university 5-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. Analyses • Fact:-6 people, (A,B,C,D,E,F) • Rules 1-people are friends 2-no one is friend • Goal – The brothers are supposed to prove that there is always a group of 3 people where either : – All3 people are friends – All3 people are strangers
  • 4. Set A:-ABC, ABD, ABE, ABF, ACD, ACE, ACF, ADE, ADF, AEF A AE AF ABC ABD ABE ABF AB ACD ACE ACF AC ADE ADF AD AEF Relation of A {A} with {B, C,D,E,F} If the new child is not a child on old father , if it is delete the new child {AB} with {C,D,E,F} {AC} with {D,E,F} {AD} with {E,F} {AE} with {F}
  • 5. {BE} with {F} {BD} with {E,F} Relation of B B BE BF BCD BCE BCF BC BDE BDF BD BEF Set B:-BCD, BCE, BCF, BDE, BDF, BEF {B} with {C,D,E,F} If the new child is not a child on old father , if it is delete the new child {BC} with {D,E,F}
  • 6. Relation of C C CE CF CDE CDF CD CEF Set C:-CDE, CDF, CEF {C} with {D,E,F} If the new child is not a child on old father , if it is delete the new child {CD} with {E,F} {CE} with {F}
  • 7. Relation of D D DE DF DEF Set D:-DEF {D} with {E,F} If the new child is not a child on old father , if it is delete the new child {DE} with {F}
  • 8. 3 friends 3 none 6 PEOPLE 1 ABC DEF A B C D E F 2 ABD CEF A B C D E F 3 ABE CDF A B C D E F 4 ABF CDE A B C D E F 5 ACD BEF A B C D E F 6 ACE BDF A B C D E F 7 ACF BDE A B C D E F 8 ADE BCF A B C D E F 9 ADF BCE A B C D E F 10 BCD AEF A B C D E F 11 BCE ADF A B C D E F 12 BCF ADE A B C D E F 13 BDE ACF A B C D E F 14 BDF ACE A B C D E F 15 BEF ACD A B C D E F 3 friends 3 none 6 PEOPLE 16 CDE ABF ABCDEF 17 CDF ABE ABCDEF 18 CEF ABD ABCDEF 19 DEF ABC ABCDEF
  • 9. Steps • Start with {A} friends with {B,C,D,E,F} • Each two friend {AB, AC, AD, AE,AF} will be a friend with {B, C, D, E, F}, delete repeated friends. • Next, start with {B} friends with {C,D,E,F}, • A is not in the set because of the repetition • Each two friend {BC,BD,BE,BF} will be a friend with {C, D,E, F} (A & B is not in the set of repetition)
  • 10. steps • Next, start with {C} friends with {D,E,F}, • A&B is not in the set because of the repetition • Each two friend {CD, CE, CF} will be a friend with {D,E, F} (A, B & C is not in the set of repetition) . • Every new child will be check with the previous explored child because of the repetition.
  • 11. Steps • Next, start with {D} friends with {E,F}, • A,B,C is not in the set because of the repetition • Each two friend {DE,DF} will be a friend with {E, F} (A B C D is not in the set)