Question: Troublesome cs problem using union find This assignment asks you to write a program in Java (or another language you choose) to find disjoint groups

Troublesome cs problem using union find  Troublesome cs problem using union find This assignment asks you to

This assignment asks you to write a program in Java (or another language you choose) to find disjoint groups in a set of data. Here is the story: Tomorrow is Jack & Lucy's wedding day. They have a lot of friends who will attend their wedding. Afterwards, they will have dinner together, so Jack & Lucy want to know minimum number of tables they need to setup. And you must consider that not all the friends know each other, and friends do not want to sit with strangers One rule for this is that if I tell you A knows B, and B knows C, that means A, B, C know each other (i.e., "X knows Y" is a transitive relationship), so they can sit on the same table. For example, if l tell you A knows B, B knows C, and D knows E, so A, B, C can sit on one table, and D, E must sit on another table. Therefore, this instance needs at least 2 tables. Input: Your program reads inputs from a file. The file starts with a line of two integers N and M (1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!