<p><strong>The problem</strong><br>
If the problem is a real task to schedule meetings then there are some mistakes in posing a question.<br>
It's because number of workers and even a number of available tables and seats not a fundamental physical constant:</p>

<ul>
<li>someone may be fired and can't participate in the next meeting;</li>
<li>HR hired 10 more workers for new project and all of them must participate in next meeting;</li>
<li>On next week starts renovation of dining room and only 20 tables would be available for next month.</li>
</ul>

<p>So problem sounds like this: "We need to schedule meetings for next 5-10 working days in a such a way that as many persons as possible meet with persons that they didn't talk before and as low persons as possible talk with another persons twice and more".</p>

<p>Therefore the problem isn't about generating a full set of permutations. Problem is about optimal planning for next N meetings.  </p>

<p><strong>Theory</strong><br>
Problem can be classified as generic <a href="http://en.wikipedia.org/wiki/Mathematical_optimization" rel="nofollow noreferrer">mathematical optimization problem</a>. For that class of problems we have a goal to find optimal solution presented as set of argument value(s) for function(s) which provides maximum or minimum value for objective function(s).<br>
To formulate a problem we must to find the root of the question:   </p>

<ul>
<li>for each person maximize a number of persons to meet with</li>
<li>for each pair of persons minimize a number of meetings</li>
</ul>

<p>Each of that goals talks about conversations between one pair of persons so we must formulate a problem in terms of "meet".<br>
Denote <code>P</code> as number of persons and <code>i in [1..P]</code> and <code>j in [1..P]</code> as person indexes.<br>
Denote <code>M</code> as quantity of meetings and   <code>m in [1 .. M]</code> as meeting number.<br>
Then let's introduce <code>a(i,j,m) | i &lt; j, i in [1..P], j in [1..P], m in [1..M]</code> as a fact of meeting between two persons on concrete meeting.
After that it's possible to formulate an objective function and bounding conditions for the problem.</p>

<p><strong>Math approach</strong><br>
Please note, that the exact solution (anyone meet another person only one time until cycle finished) possible only in very rare cases.<br>
This is NP-complete class problem and best matched formulation is "optimization problem of perfect matching in k-uniform hypergraphs satisfying a 1-degree co-degree condition".<br>
For further theory research you can ask a question at <a href="https://math.stackexchange.com/">Mathematics</a> or examine <a href="https://www.google.com/webhp?hl=en#hl=en&amp;output=search&amp;sclient=psy-ab&amp;q=site:arxiv.org%20k-uniform%20hypergraphs%20co-degree%20perfect%20matching&amp;oq=site:arxiv.org%20k-uniform%20hypergraphs%20co-degree%20perfect%20matching&amp;gs_l=hp.3...1189.1189.0.2279.1.1.0.0.0.0.83.83.1.1.0....0...1c..23.psy-ab..1.0.0.If26gVMUDU0&amp;pbx=1&amp;bav=on.2,or.r_qf.&amp;bvm=bv.50165853,d.bGE,pv.xjs.s.en_US.seW1cfrvSKg.O&amp;fp=e0dbde624e795fe5&amp;biw=1333&amp;bih=712" rel="nofollow noreferrer">latest works available</a> for k-uniform hypergraph partitioning, e.g. <a href="http://arxiv.org/pdf/1307.2608.pdf" rel="nofollow noreferrer">"Polynomial-time perfect matchings in dense hypergraphs"</a></p>

<p>Solution must have exactly <code>(P-1)/(T-1)=(320-1)/(8-1)=45.5714285714</code> meetings because every time person meets 7 others and "others" number is 319. So it can be 45 meetings according conditions of the question before some pair of persons meets twice.</p>

<p>There are a similar question with good answer already on StackOverflow (<a href="https://stackoverflow.com/questions/2955318/creating-combinations-that-have-no-more-one-intersecting-element/2955527#2955527">link</a>). Note that this algorithm leaves empty places, because for full placement of all persons it requires to <code>seats * prime = person_count</code> and 41 chosen as prime.<br>
Below is query using this solution (<a href="http://www.sqlfiddle.com/#!4/d41d8/15390" rel="nofollow noreferrer">SQLFiddle</a>).</p>

<pre><code>with params as (
  select
    320 n,  -- number of persons
    8   k,  -- number of seats per table
    41  p   -- least prime which greather or equal n/k  
  from dual
),
person_set as (
  select level person_id from dual connect by level &lt;= (select n from params)  
), 
person_map as (
  select 
    person_id,
    mod( mod(person_id, p.k * p.p), p.k )    x,
    trunc( mod(person_id, p.k * p.p) / p.k ) y
  from person_set, params p
),
meetings as (
  select (level-1) meeting_no 
  from dual 
  connect by level &lt;= (select least(k*p, (n-1)/(k-1)) from params)
),
seats as (
  select (level-1) seat_no 
  from dual 
  connect by level &lt;= (select k from params)
),  
tables as (
  select (level-1) table_no 
  from dual 
  connect by level &lt;= (select p from params)
),
meeting_plan as (
  select --+ ordered use_nl(seats tables)
    meeting_no,
    seat_no,
    table_no, 
    (  
       select 
         person_id 
       from 
         person_map 
       where 
         x = seat_no 
         and 
         y = mod(meeting_no*seat_no + table_no, p.p)
    ) person_id
  from 
    meetings, seats, tables, params p
)
select 
  meeting_no,
  table_no,
  max(case when seat_no = 0 then person_id else null end) seat1,
  max(case when seat_no = 1 then person_id else null end) seat2,
  max(case when seat_no = 2 then person_id else null end) seat3,
  max(case when seat_no = 3 then person_id else null end) seat4,
  max(case when seat_no = 4 then person_id else null end) seat5,
  max(case when seat_no = 5 then person_id else null end) seat6,
  max(case when seat_no = 6 then person_id else null end) seat7,
  max(case when seat_no = 7 then person_id else null end) seat8
from meeting_plan
group by meeting_no, table_no
order by meeting_no, table_no
</code></pre>

<p><strong>Practical approach</strong><br>
From practical point of view we don't need exactly optimal solution with theoretical proof. If one person meet another more than once it's not a big deal, so it's possible to stop at nearly optimal solution.<br>
Such a solution can be generated on  basis of empirical rules if we start to place persons one by one to meetings and  tables trying to keep number of intersection for each pair of persons as low as possible.<br>
There are many strategies of placing possible and one of them illustrated below.</p>

<p>For demonstration purposes I use Oracle because this database present in question tags and it's available at <a href="http://www.sqlfiddle.com/#!4" rel="nofollow noreferrer">SQLFiddle</a> site.  </p>

<p>Example database schema setup includes three tables:</p>

<p><code>person</code> - table with list of workers;  </p>

<p><code>person_pair</code> - table with list of all unique pairs of workers and count of intersection for each pair, totally <code>floor((P*P)/2) - floor(P/2)</code> rows. In case of <code>P</code>=320 it holds 51040 rows.  </p>

<p><code>meeting</code> - table with placement information for each person on each meeting.</p>

<p>In example code number of workers limited to <code>20</code> and number of seats to <code>4</code> because of resource consumption limits on SQLFiddle site and to keep result datasets observable.</p>

<p>Below is code for scheme setup and fill. Please look through the comments to find out more about table fields.</p>

<pre><code>-- List of persons
create table person(
  person_id number not null -- Unique person identifier.
);
-- primary key
alter table person add constraint pk_person primary key (person_id) using index;

-- List of all possible unique person pairs
create table person_pair(
  person1_id number not null, -- 1st person from pair, refers person table. 
  person2_id number not null, -- 2nd person from pair, refers person table.
                              -- person1_id always less than person2_id.
  meet_count number           -- how many times persons in pair meet each other.
);
-- primary key
alter table person_pair add constraint pk_person_pair primary key (person1_id, person2_id) using index;
-- indexes for search
alter table person_pair add constraint idx_pair2 unique (person2_id, person1_id) using index;

-- Placement information for meetings
create table meeting(
  meeting_number number not null, -- sequential meeting number
  table_number   number not null, -- table number
  person_id      number not null, -- person placed on that table and meeting
  seat_no        number           -- seat number
);
-- primary key: person can seat on the same table only once in one meeting
alter table meeting add constraint pk_meeting primary key (meeting_number, table_number, person_id) using index;
-- disallow duplicate seats on the same table during one meeting
alter table meeting add constraint miting_unique_seat unique (meeting_number, table_number, seat_no) using index;
-- person can participate in meeting only once
alter table meeting add constraint miting_unique_person unique (meeting_number, person_id) using index;
</code></pre>

<p>Fill initial data (<a href="http://www.sqlfiddle.com/#!4/9937a/2" rel="nofollow noreferrer">SQLFiddle</a>):</p>

<pre><code>begin
  -- Fill persons list with initial data 
  insert into person(person_id)
  select level from dual connect by level &lt;=20;

  -- generate person pairs
  insert into 
    person_pair(person1_id, person2_id, meet_count)
  select 
    p1.person_id, 
    p2.person_id, 
    0
  from 
    person p1,
    person p2
  where 
    p1.person_id &lt; p2.person_id
  ;

end;
/
select * from person order by person_id
/
select * from person_pair order by person1_id, person2_id
/
</code></pre>

<p><strong>Generating meetings</strong>  </p>

<p>Strategy consist of 2 parts:<br>
1. Select persons in specific order;<br>
2. Place persons from list one-by-one at most appropriate table.</p>

<p>Arranging people in selection list is attempt to place persons who meet before many times before as early as possible and place it at separate tables. </p>

<p>Placing persons are more tricky and main purpose at that stage is to maximize number of first meetings and minimize number of repeated meetings. So it's close to problem of construction of proper objective function for optimization problem, what is non-trivial in most of a real world cases.</p>

<p>I choose this criteria:</p>

<p>For each table counted two factors: "attractive"(<code>A</code>) - why place person at that table and "repellent"(<code>R</code>) - why person can't seat on that table.<br>
This factor composed toghether to get final table arranging factor:<br>
<code>-A*A - (if A=0 then 0 else R/2) + R</code><br>
"Attractive" factor counted as number of persons already placed at the table with which current person not meet before.<br>
"Repellent" factor counted as sum of number of meetings of current person with all persons already at the table.</p>

<p>Very probably it not so good as it can, but enough for purposes of example.
For example formula can be extended to take into account how much time has been passed since the last meeting.</p>

<p>You can experiment with building good expression for choosing table on your own.</p>

<p>Next is code for generation of meetings.</p>

<p>Code (<a href="http://www.sqlfiddle.com/#!4/9937a/1" rel="nofollow noreferrer">SQLFiddle</a>)</p>

<pre><code>declare 
  vMeetingNumber      number;      -- number of current meeting 
  vNotMeetPairCount   number;      -- number of pairs not meet before 
  vTableCapacity      number := 4; -- number of places at one table
  vTableCount         number;      -- number of tables    
begin

  -- get next meeting number for case of continous generation
  select nvl(max(meeting_number),0) + 1 into vMeetingNumber from meeting;

  -- count minimum required table number
  select ceil(count(1)/vTableCapacity) into vTableCount from person;

  -- number of remaining pairs who don't meet before
  select count(1) into vNotMeetPairCount 
  from person_pair 
  where meet_count &lt; 1;

  -- Generate new meetings while not all persons meet each other
  while (vNotMeetPairCount &gt; 0) loop

    -- select list of persons to place
    for cPersons in (

      with person_meets as (
        select  
          pp.person1_id, pp.person2_id, pp.meet_count,
          ( row_number() over (
              order by pp.meet_count desc, pp.person1_id 
            )
          )   row_priority
        from 
          person_pair pp    
     )
     select person_id from (
       select person_id, sum(pair_meet_count*pair_meet_count) pair_meetings from (
         select person1_id person_id, meet_count pair_meet_count from person_meets
         union all
         select person2_id person_id, meet_count pair_meet_count from person_meets
       )
       group by person_id   
     )  
     order by pair_meetings desc

    ) loop

      -- add current person to most applicable table

      insert into meeting(meeting_number, table_number, person_id, seat_no)
      select 
        vMeetingNumber, table_number, cPersons.person_id, seat_no
      from (
        with available_tables as (
          select 
            table_number, places_occupied
          from (  
            select
              t.table_number,
              (
                select count(1)
                from meeting m
                where 
                  m.meeting_number = vMeetingNumber 
                  and     
                  m.table_number = t.table_number
              ) places_occupied
            from (
              select level table_number
              from dual connect by level &lt;= vTableCount
            ) t
          )
          where places_occupied &lt; vTableCapacity    
        )
        select 
          table_number,
          seat_no,
          ( row_number() over ( order by 
              -attractor_factor*attractor_factor - decode(attractor_factor,0,0,repellent_factor/2) + repellent_factor 
            ) 
          )  row_priority
        from (     
            select                             
              t.table_number,
              t.places_occupied + 1 seat_no,
              (
                select 
                  count(1)
                from
                  meeting     m,
                  person_pair pp
                where
                  m.table_number = t.table_number
                  and
                  m.meeting_number = vMeetingNumber
                  and
                  pp.person1_id = least(m.person_id, cPersons.person_id)
                  and               
                  pp.person2_id = greatest(m.person_id, cPersons.person_id)
                  and
                  pp.meet_count = 0
              )  attractor_factor,
              (
                select 
                  nvl(sum(meet_count),0)
                from
                  meeting     m,
                  person_pair pp
                where
                  m.table_number = t.table_number
                  and
                  m.meeting_number = vMeetingNumber
                  and
                  pp.person1_id = least(m.person_id, cPersons.person_id)
                  and               
                  pp.person2_id = greatest(m.person_id, cPersons.person_id)
                  and
                  pp.meet_count &gt; 0
              )  repellent_factor,
              1 random_factor --trunc(dbms_random.value(0,1000000)) random_factor
            from              
              available_tables t
        )
      )
      where 
        row_priority = 1
      ;  

    end loop;

    -- Update number of meets 
    update person_pair 
    set meet_count = meet_count + 1 
    where         
      (person1_id, person2_id) in (
        select 
          m1.person_id person1_id,
          m2.person_id person2_id
        from
          meeting m1,
          meeting m2
        where   
          m1.meeting_number = vMeetingNumber
          and
          m2.meeting_number = vMeetingNumber
          and
          m1.table_number = m2.table_number  
          and 
          m1.person_id &lt; m2.person_id
      )
    ;

    -- advice to next meeting
    vMeetingNumber := vMeetingNumber + 1;

    -- count pairs who don't meet before
    select count(1) into vNotMeetPairCount 
    from person_pair
    where meet_count &lt; 1;

  end loop;

end;  
</code></pre>

<p><strong>A little bit more theory</strong></p>

<p>Generated solution can be used as start point for some <a href="http://en.wikipedia.org/wiki/Multi-objective_optimization" rel="nofollow noreferrer">multicriteria optimization methods</a>, but to use it you must have a good formal formulation of the problem.</p>

<p>Hope that all stated above helps you to resolve the problem.</p>
How can I generate a "Social Golfer" matrix for worker seating arrangement?
<p>EDIT: I am looking for an APL function, or MS Access VBA function, which takes as arguments the total number of employees, total number of dinning tables, and number of employees per dinning table for generating rotating seating assignments.</p>
<p>This challenge is a <a href="http://www.logic.at/prolog/mst.pdf" rel="nofollow noreferrer">Social Golfer Problem</a> scenario.  I have a company with 280 persons. I recently implemented a Management By Objectives (MBO) program where each worker is assigned goals to be completed on a monthly basis. One of the recurring goals is to arrive on time at work to attend a 30 minute coffee and dounut meeting each morning. The meeting is held in our dinning hall which has 50 tables. Each table can seat up to 12 persons maximum, however we are only using 6 per table because of the Covid pandemic.</p>
<p>I want to generate unique sets of seating arrangement for each dinning table so that each person can meet and collaborate with every other person on a rotating basis until all unique sets are exhausted. Then the cycle starts all over where two or more employees might be seated at the same table again.</p>
<p><strong>(EDIT)</strong> RULE: Unique sets of 6 people are required for each workday. A person cannot  be seated again with other persons they have sat with in the past until all possible permutations have been exhausted.</p>
<p><strong>EDIT:</strong> An example of the desired result is:</p>
<pre><code>Day 1: 

Table 1 will seat worker numbers 1,2,3,4,5,6.
Table 2 will seat worker numbers 7,8,9,10,11,12.
...
Table 50 will seat worker numbers 275,276,277,278,279,280.

Day 2:

Table 1 will seat worker numbers 7,13,19,26,33,40.
Table 2 will seat worker numbers 14,20,27,34,41,48
... 
</code></pre>
<p><strong>NOTE:</strong> (So, the next workday and thereafter, workers 1 through 6
cannot ever be seated together at the same table with any other workers from that same set until all possible permutations have been exhausted).</p>