Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 791165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:47:33+00:00 2026-05-14T21:47:33+00:00

Just a curiosity question. Remember when in class groupwork the professor would divide people

  • 0

Just a curiosity question. Remember when in class groupwork the professor would divide people up into groups of a certain number (n)?

Some of my professors would take a list of n people one wants to work with and n people one doesn’t want to work with from each student, and then magically turn out groups of n where students would be matched up with people they prefer and avoid working with people they don’t prefer.

To me this algorithm sounds a lot like a Knapsack problem, but I thought I would ask around about what your approach to this sort of problem would be.

EDIT: Found an ACM article describing something exactly like my question. Read the second paragraph for deja vu.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:47:34+00:00Added an answer on May 14, 2026 at 9:47 pm

    To me it sounds more like some sort of clique problem.

    The way I see the problem, I’d set up the following graph:

    • Vertices would be the students
    • Two students would be connected by an edge if both of these following things hold:
      1. At least one of the two students wants to work with the other one.
      2. None of the two students doesn’t want to work with the other one.

    It is then a matter of partitioning the graph into cliques of size n. (Assuming the number of students is divisible by n)

    If this was not possible, I’d probably let the first constraint on the edges slip, and have edges between two people as long as neither of them explicitly says that they don’t want to work with the other one.

    As for an approach to solving this efficiently, I have no idea, but this should hopefully get you closer to some insight into the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is just an out of curiosity question. Let's say you have a database
This is just a question out of curiosity since I have been needing to
Just a matter of curiosity, is the Gray code defined for bases other than
As noticed in this question: Randomize a List<T> you can implement a shuffle method
What is the right way to split a string into words ? (string doesn't
How to access i from the outer class? HashSet<Integer> hs=new HashSet<Integer>(){ int i=30; };
#include <iostream> using namespace std; class Imp { public: int X(int) {return 50;} int
I'm sure this question has been answered before, but I don't think I'm using
When writing my own events to the error log, do I have to have
Looking at the C# numeric data types, I noticed that most of the types

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.