Question: Python programming assignment using Graphs: implement using graphs: ex (BFS, DFS, etc. algorithms) There is a community that meets in small groups. One of the

Python programming assignment using Graphs: implement using graphs: ex (BFS, DFS, etc. algorithms)

There is a community that meets in small groups. One of the goals of the community is that every member gets to know every other member, and that everyone gets to go to everyones home. The small group meetings happen in the house of the host.

  • Your goal is to design and develop a program that will read a list of people and the desired size of small groups. There is one additional issue to consider: married couples always go together

  • The program will produce a list of lists. Each iteration produces a list of groups the most evenly distributed possible in such a way that there is a host for each group, married couples are always together and everyone gets to go to everybody elses home.

  • Something to note: Given a list of n people with a size of small groups m, what is the minimum number of iterations necessary to accomplish the goal of everybody visiting everybody's house? What is the time complexity of such an algorithm?

  • Have three text files, one with 16 names, one with 29 names, one with 34 names. Include some married couples in all three files. Married couples should be in a single line separated by commas, then each name on its own line.

Example with small group size 4:

Python programming assignment using Graphs: implement using graphs: ex (BFS, DFS, etc.

Example John + Ann, Peter + Melissa, George, Lisa, Jenny, Alma, Jerry, James, Albert, Jack, Jill, Jaimie, July, Karl, Hector, Kathy, Bert, Homer, Jean, Joan, Geordi, Scott, Ivan, Yi-Ran, Abdul, Italo, Mark First Iteration G1,1: John + Ann, Peter + Melissa G1,2: George, Lisa, Jenny, Alma G1,3: Jerry, James, Albert, Jack G1,4: Jill, Jaimie, July, Karl G1,5: Hector, Kathy, Bert, Homer G1,6: Jean, Joan, Geordi, Scott G1,7: Ivan, Yi-Ran, Abdul, Italo, Mark Note: since the list is not a multiple of 4, one person needs to be "added to the last group. If there was another person, then G1,6 and G1,7 would have an extra person. The green name is the host Example John + Ann, Peter + Melissa, George, Lisa, Jenny, Alma, Jerry, James, Albert, Jack, Jill, Jaimie, July, Karl, Hector, Kathy, Bert, Homer, Jean, Joan, Geordi, Scott, Ivan, Yi-Ran, Abdul, Italo, Mark First Iteration G1,1: John + Ann, Peter + Melissa G1,2: George, Lisa, Jenny, Alma G1,3: Jerry, James, Albert, Jack G1,4: Jill, Jaimie, July, Karl G1,5: Hector, Kathy, Bert, Homer G1,6: Jean, Joan, Geordi, Scott G1,7: Ivan, Yi-Ran, Abdul, Italo, Mark Note: since the list is not a multiple of 4, one person needs to be "added to the last group. If there was another person, then G1,6 and G1,7 would have an extra person. The green name is the host

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!