Max-Flow modeling problem. How to assign all flow to one edge

24 Views Asked by At

I'm having trouble to model the following as a max-flow problem.

Problem description. You have a group of N people. Each person belongs to one of the K teams. There are T tables with capacity of 6 people.

Is there a way to assign people to tables such as every team gets assigned to the same table?

My flow graph is

Nodes:

  • nodes source (s) and sink (t)
  • one node for each person
  • one node for each team
  • one node for each table

Edges:

  • from source to person with capacity 1
  • from person to team that belongs with capacity 1
  • from team to table here I find trouble
  • from table to sink with capacity 6

I don't know how to connect teams with tables without spliting the team into multiple tables

0

There are 0 best solutions below