Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (baseballer2014):

Rita, a columnist for the Daily Princetonian, is covering a party. Rita’s job is to identify a celebrity, if one exists. A celebrity is person that is known by every other person, but doesn’t know any of them. Rita asks questions to the guests of the following form: Excuse me. Do you know the person over there? Assume that all of the guests at the party are polite (even the celebrity) and answer any question with the correct answer. Explain how Rita can identify the celebrity using as few questions as possible.

OpenStudy (baseballer2014):

@dan815 @hero

OpenStudy (dan815):

hmm how about asking someone if they know someone else, if yes then go to the other person and ask them if they know the person you just asked, if they say no then that's a celeb? otherwise they dont know each other, and are excluded from the list, if the first answer is No to begin with you should still go to ask the other person if they know the person you just asked, if yes then u asked the celeb if no then theyre both excluded

OpenStudy (dan815):

probably wrong though theres a very bad assumption that people who know someone other than the celeb must be aquaintances

OpenStudy (dan815):

@bswan how??

OpenStudy (anonymous):

well ur correct dan , if u asked do u know someone else if yes the its normal no its the celeb

OpenStudy (dan815):

lol :)

OpenStudy (dan815):

look at my beautiful wannabe code

OpenStudy (dan815):

let Guest={G0,G1,G2....Gn} , #list of guests with different indices For n= 0:2:n A=Guest(n) B=Guest(n+1) ask person A : do you know person B {if yes: {Ask B: do you know A? if yes Exclude both and ask 2 new people If no B is Celeb} {If no: {Ask B: Do you know A? if yes: A is celeb, break if No: Exclude both and ask 2 different people} }

OpenStudy (anonymous):

nice work :D u can draw algorithm hehe wanna try :P

OpenStudy (anonymous):

T_T

OpenStudy (dan815):

that algorithm has all sorts of languages mixed in it lol... i didnt learn any langueage well soo its all a jumble

OpenStudy (dan815):

theres a bit of python influence... some java some matlab

OpenStudy (dan815):

i write some silly programs in matlab :)

OpenStudy (dan815):

do you know sudoku solver??

OpenStudy (anonymous):

i can solve sod by my self :P

OpenStudy (dan815):

yes buut to make the computer do it for you it seems magical

OpenStudy (anonymous):

yeah right

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!