Developer FAQs

Developer Questions And Answers

×
MENU
  • Languages
  • Web
  • Database
HomecombinatoricsPosts
How to find all partitions of a multiset, where each part has distinct elements? Languages

How to find all partitions of a multiset, where each part has distinct elements?

Let's say we have such an array: myArray = [A, A, B, B, C, C, D, E]I would like to create an algorithm so that it will find all the combinations that add up to the whole array, where none of the elements are repeated.
02月12日 发表评论
Read More
How to find all partitions of a multiset, where each part has distinct elements? Languages

How to find all partitions of a multiset, where each part has distinct elements?

Let's say we have such an array: myArray = [A, A, B, B, C, C, D, E]I would like to create an algorithm so that it will find all the combinations that add up to the whole array, where none of the elements are repeated.
02月11日 发表评论
Read More
count number of partitions of a set with n elements into k subsets Languages

count number of partitions of a set with n elements into k subsets

This program is for count number of partitions of a set with n elements into k subsets I am confusing here return k*countP(n-1, k) + countP(n-1, k-1); can some one explain what is happening here? why we are multiplying with k?
12月20日 发表评论
Read More
Picking unordered combinations from pools with overlap Languages

Picking unordered combinations from pools with overlap

I have pools of values and I would like to generate every possible unordered combination by picking from certain pools.
08月19日 发表评论
Read More
What is the more elegant way of finding combinations in a list? Languages

What is the more elegant way of finding combinations in a list?

I came up with this algorithm to find triplets of pairs (I call them trairs), the criteria is that all 3 elements (coins), and only the 3, must be present in all 3 pairs.
07月05日 发表评论
Read More
Find most efficient groups of pairs Languages

Find most efficient groups of pairs

I have a group of people, and I want each person to have a 1:1 meeting with every other person in the group. A given person can only meet with one other person at a time, so I want to do the following:
07月01日 发表评论
Read More
Python Numpy vectorize nested for-loops for combinatorics Languages

Python Numpy vectorize nested for-loops for combinatorics

Given an nxn array A of real positive numbers, I'm trying to find the minimum of the maximum of the element-wise minimum of all combinations of three rows of the 2-d array. Using for-loops, that comes out to something like this:
04月26日 发表评论
Read More
Copyright ©  Developerfaqs  All Rights Reserved.

登录 找回密码

输入用户名或电子邮箱地址,您会收到一封新密码链接的电子邮件。

  • 文章目录
  • icon