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 147327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:45:44+00:00 2026-05-11T08:45:44+00:00

Given is a set S of size n, which is partitioned into classes (s1,..,sk)

  • 0

Given is a set S of size n, which is partitioned into classes (s1,..,sk) of sizes n1,..,nk. Naturally, it holds that n = n1+…+nk.

I am interested in finding out the number of ways in which I can combine elements of this partitioning so that each combination contains exactly one element of each class.

Since I can choose n1 elements from s1, n2 elements from s2 and so on, I am looking for the solution to max(n1*..*nk) for arbitrary n1,..nk for which it holds that n1+..+nk=n.

I have the feeling that this is a linear-optimization problem, but it’s been too long since I learned this stuff as an undergrad. I hope that somebody remembers how to compute this.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T08:45:44+00:00Added an answer on May 11, 2026 at 8:45 am
    floor(n/k)^(k - n mod k)*ceil(n/k)^(n mod k) 

    — MarkusQ

    P.S. For the example you gave of S = {1,2,3,4}, n = 4, k = 2 this gives:

    floor(4/2)^(2 - 4 mod 2)*ceil(4/2)^(4 mod 2) floor(2)^(2 - 0)*ceil(2)^(0) 2^2 * 2^0 4 * 1 4 

    …as you wanted.

    To clarify, this formula gives the number of permutations generated by the partitioning with the maximum possible number of permutations. There will of course be other, less optimal partitionings.

    For a given perimeter the rectangle with the largest area is the one that is closest to a square (and the same is true in higher dimensions) which means you want the sides to be as close to equal in length as possible (e.g. all either the average length rounded up or down). The formula can then be seen to be:

       (length of short sides)^(number of short sides) times    (length of long sides)^(number of long sides) 

    which is just the volume of the hyper-rectangle meeting this constraint.

    Note that, when viewed this way, it also tells you how to construct a maximal partitioning.

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

Sidebar

Related Questions

I can see that Collections.unmodifiableSet returns an unmodifiable view of the given set but
Given a set of questions that have linked survey and category id: > db.questions.find().toArray();
First the practical application that led me to the problem: Given a set of
Given the working code snippet glBufferData(GL_ARRAY_BUFFER, vertices->size() * sizeof(glm::vec3), &vertices->front(), GL_STATIC_DRAW); // Set the
I tried out hibernate mapping for domain classes in my application- which are Book,Author
Say you have a buffer of size N which must be set to definite
When given a static set of objects (static in the sense that once loaded
Is there any way of automating a site publish with a given set of
This is one of the solution of getting true or false from given set
Given a set of phrases, i would like to filter the set of all

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.