Puzzle | Bilateral Conversations
Last Updated : 18 Jan, 2023
There are n students in a class, each in possession of a different personality attribute. As they are new in the school, so they want to know about each other. To help the students, the teacher decides to conduct an activity. The rule for the activity is that the students will share the personality attributes of each other through a series of bilateral conversations (e.g., via a telephone). Assume that in every conversation both parties exchange all the personality attributes they know at the time. What is the minimum number of conversations they need to guarantee that everyone of them gets all the personality attributes?
Solution : Let us denote the n students as S1, S2, S3, ........., Sn. When the
Number of students (n) = 1, then the number of conversations required is 0 as no bilateral conversation is possible.
For n = 2, the number of conversations required is 1 i.e, between S1 and S2.
For n = 3, three conversations are needed which are as (S1 with S2), (S2 with S3), (S1 with S3)).
For n = 4, four conversations are needed.
For n = 5, six conversations are needed.
For n = 6, eight conversations are needed.

The above figures shows the optimal personality attribute sharing via bilateral conversations. The sequential order of conversations is indicated by the labels on the edges connecting the vertices, representing the conversing parties. The order of conversations can vary. The logic can be further extended to n = 7, 8 and so on. If observed then it can be seen that the
total number of conversations in this algorithm is equal to 2(n - 4) + 4 = 2n - 4 where n >= 4. What is the best way to make conversations ensuring minimality: For n > 4, the solution for n = 4 can be extended by making each of students S5, S6, . . ., Sn talk with person S1 before S1 talks with S2, S3 with S4, S1 with S4 and S2 with S3 and then making S1 talk with each of students S5, S6, . . ., Sn for the second time.
Note: The order of conversations may vary but the total number of minimum conversations will remain same which can be clearly seen in images for n = 6. Reference :
Algorithmic Puzzles – Anany Levitin, Maria Levitin Similar Reads
Puzzle | Paradox Dragons Puzzle: There are 3 dragons. One of them always speaks the truth, one always lies and one alternate between truth and lie. A series of conversation takes between Ram and the 3 dragons which lets you identify the nature of each dragon. Dragon 1: "You may ask us one question, then you must guess which
2 min read
Puzzle | Handshakes A couple invites n - 1 other couples to dinner. Once everyone arrives, each person shakes hands with everyone he doesnât know. Then, the host asks everyone how many hands they shook and each person replies with a different number. Assuming that everyone knows his or her own spouse, how many hands di
2 min read
Top 100 Puzzles Asked In Interviews Puzzles are asked in Interviews to check our problem-solving skills. Here we are providing you with the top 100 puzzles that are asked in Interviews. The main aim of puzzles is entertainment. Puzzles can be of many types:- picture puzzles, logical puzzles, mathematical puzzles, etc. It is very helpf
4 min read
Communication Cycle - Definition, Components, Methods, Significance The correspondence cycle is characterized as a correspondence interaction that makes sense of how the process for conveying and understanding messages capabilities. In a correspondence cycle, a source, message, encoder, channel, decoder, recipient, commotion, criticism kinds of components are contai
8 min read
Amazon Interview Experience | Set 352 (For SDE I) 1) Online coding round of 45 minutes. We had a question where we had to read an unknown number of lines from a data file. Each line had a formatted date time stamp and a person's name. We were supposed to tell if some person had appeared twice on the same date or not. For C++, i used getline to take
3 min read