Jump to content
BrainDen.com - Brain Teasers
  • 0

call chain


jasen
 Share

Question

There was 25 kids in a class, every kids had some best friends.
To simplify the problem, Let's call each kids with their initial name.
here is a list of kids best friends.

a : [l,h]
b : [k,m,i]
c : [f,l,n,j]
d : [g,m,o]
e : [h,n]
f : [c,m,q]
g : [d,n,r,p]
h : [a,k,q,s,o,e]
i : [b,l,r,t]
j : [c,m,s]
k : [u,r,h,b]
l : [u,w,s,i,c,a]
m : [f,b,d,j,t,x,p,v]
n : [y,w,q,g,c,e]
o : [x,r,h,d]
p : [w,m,g]
q : [x,n,h,f]
r : [u,k,g,i,o,y]
s : [v,l,h,j]
t : [w,m,i]
u : [l,r]
v : [k,m,s]
w : [p,l,n,t]
x : [q,m,o]
y : [r,n]

One day all kids was outside the class room except "a".
then his teacher asked "a" to call one of his best friend to enter the room, "a" called "l". 
then the teacher asked "l" to call one of his best friend outside to enter the room, and so on.
after all the call chain, there was no more kids outside, and "s" was the last kids called.

determine the call chain !

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Spoiler

Greedy algorithm: identify and use the letter that only has a pair left - an in-node, an out-node.

a called l
l called u
u called r
r called y
y called n
n called e
e called h
h called k
k called b
b called i
i called t
t called w
w called p
p called g
g called d
d called o
o called x
x called q
q called f
f called c
c called j
j called m
m called v
v called s

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...