Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Spy math puzzle

Options
  • 29-01-2002 12:31pm
    #1
    Closed Accounts Posts: 175 ✭✭


    Right there are ten spies, each of which has to get a piece of information. Each of them has to get all ten pieces but they only get one from the source the other nine come from the other spies. All communication is carried out through e-mail. What is the minimum number of e-mails that must be sent for every spy to assemble the complete set of info?

    After much drawing on scraps of paper, cursing and pulling my hair, I continue to get an answer the same answer but I'm certain I'm wrong. I won't give it to ya yet so you're not biased. I NEED TO KNOW IF I'M RIGHT GODDAMMIT.

    Fade to credits
    Scipio_major


Comments

  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    I can do it with 18 emails off the top of my head, but I havent checked to see if thats the minimum yet. If your answer is larger than 18 then you are incorrect.

    jc


  • Registered Users Posts: 78,436 ✭✭✭✭Victor


    I would say 10. Each spy e-mail send one e-mail and cc.s it to everyone else

    1. A -> B,C,D,E,F,G,H,I,J
    2. B -> A,C,D,E,F,G,H,I,J
    3. C -> A,B,D,E,F,G,H,I,J
    4. D -> A,B,C,E,F,G,H,I,J
    5. E -> A,B,C,D,F,G,H,I,J
    6. F -> A,B,C,D,E,G,H,I,J
    7. G -> A,B,C,D,E,F,H,I,J
    8. H -> A,B,C,D,E,F,G,I,J
    9. I -> A,B,C,D,E,F,G,H,J
    10. J -> A,B,C,D,E,F,G,H,I

    Alternatively, seeing as they are spies (and spy D shouldn't know about spy G, his sworn enemy), each spy sends one e-mail to the ring-leader (9 e-mails) and the ring-leader bcc.s (blind) a summary to everyone (10th e-mail)


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    In fact, having thought about it, I'm pretty sure I can prove that 18 e-mails (at a minimum) are required.

    So - why can I prove this when Victor has just come up with a figure of 10?

    Simple.

    I am, of course, consdering that sending one e-mail to n recipients counts as n e-mails, because although you only send one mail message from your client, multiple copies get generated and sent.

    If you dont count cc-ing as multiple mails, then the answer must be 10, as each spy must send his code out (requiring a minimum of 10 messages) before everyone can have all codes. So the answer cannot be less than 10.

    jc


  • Registered Users Posts: 78,436 ✭✭✭✭Victor


    Originally posted by bonkey
    In fact, having thought about it, I'm pretty sure I can prove that 18 e-mails (at a minimum) are required.

    It all really depends on the definition of one "e-mail".

    And if only the ring leader needed to know you would only need 9. Then he could ICQ the others ;)


  • Closed Accounts Posts: 2,155 ✭✭✭ykt0di9url7bc3


    i see it as a ring of one email being sent around until all have gotten the info


  • Advertisement
  • Closed Accounts Posts: 175 ✭✭scipio_major


    By a majority a majority vertict I think we can assume that 18 is the answer. And yes that is what I got (Nine of the spies sent their bits of information to the tenth who puts it all together in a news letter and sents it back out to the nine). From that you'll see that I was counting carbon-copies as seperate e-mail, although I should have specified. Thanks.

    Fade to credits
    Scipio_major


  • Closed Accounts Posts: 1,136 ✭✭✭Bob the Unlucky Octopus


    A simple tree structure shows a Hamiltonian solution of 18 :)

    Occy


  • Registered Users Posts: 898 ✭✭✭Winning Hand


    18 if you count each email as being only availably to be sent to one person.
    1 tells everything he knows (f*ck all) to 2
    2 tells 3 everything he knows (f*ck all X 2)
    3 tells 4........................
    10 ends up with the complete picture (9 emails)
    It is then his mission, should he choose to accept it, to relay the full info to his other compatriots, another 9 adding up to 18


  • Registered Users Posts: 310 ✭✭Cerberus


    I suppose it depends how you interpret the question. If you take "All communication is carried out through e-mail" as meaning that there is an e-mail sent in order for each spy to get their unique piece of info from their sources then you would have to add on 10 emails onto the total of 18 making 28. But as I said, it depends on how you take up the question.


  • Registered Users Posts: 78,436 ✭✭✭✭Victor


    It only ask how many e-mails to assemble the information, not how many to source and assemble (the first sentence is misleading in this regard.).


  • Advertisement
  • Closed Accounts Posts: 175 ✭✭scipio_major


    Thanks Victor. You all know why I try to avoid telling jokes in public, I *always* mess them up.

    Fade to credits
    Scipio_major


  • Registered Users Posts: 78,436 ✭✭✭✭Victor


    No, no, in fairness, I'm a picky git who will find any actual or potential discrepancy. Feel honoured ;)


Advertisement