Speed dating algorithm

后端 未结 9 779
深忆病人
深忆病人 2021-02-04 10:19

I work in a consulting organization and am most of the time at customer locations. Because of that I rarely meet my colleagues. To get to know each other better we are going to

9条回答
  •  眼角桃花
    2021-02-04 10:52

    heres an idea
    first work from the perspective of the first person .. lets call him X
    X has to meet all the other people in the room, so we should divide the remaining people into n groups ( where n = #_of_people/capacity_per_table ) and make him sit with one of these groups per iteration
    Now that X has been taken care of, we will consider the next person Y
    WLOG Y be a person X had to sit with in the first iteration itself.. so we already know Y's table group for that time-frame.. we should then divide the remaining people into groups such that each group sits with Y for every consecutive iteration.. and for each iteration X's group and Y's group have no person in common
    .. I guess, if you keep doing something like this, you will get an optimal solution (if one exists)

    Alternatively you could crowd source the problem by giving each person a card where they could write down the names of all the people they got dine with.. and at the end of event, present some kind of prize to the person with the most names in their card

提交回复
热议问题