Skip to main content

All Questions

2 votes
1 answer
448 views

Number of Combinations of Items from Sets with Dependencies

Given a collection of $n$ sets of elements, and choosing exactly 1 element from each set, where $S$ is the size (number of elements) of a set, then the total number $w$ of possible combinations of ...
Ben Hershey's user avatar
1 vote
1 answer
101 views

Efficient way to count the number of ways to select 3 numbers from a given list has their AND(bit-wise) equal 0

Suppose a list A contains non-negative numbers no larger than $2^8$. Eg. A = {4, 9, 6, 1, 15, 8, 3, 5, 18, 7} I want to find the number of selecting 3 members of A such that their AND bit-wise ...
HCN's user avatar
  • 13
0 votes
3 answers
4k views

All possible ways to split a number

I am trying to find a way to find (if it is possible) how many ways there are to split a number of n digits considering that the "splits" can occur everywhere and the subsets don't have to be the same ...
Craig Montevecchi's user avatar
0 votes
1 answer
191 views

Algorithm to find integer combinations satisfying a set of inequalities

I have an engineering problem that is reduced to finding a set of positive integer combinations satisfying several inequalities and some other properties. Specially, let $\mathcal{S}$ be the set of ...
leeyee's user avatar
  • 317
0 votes
1 answer
57 views

How to create subsequences from a set of ordered integers given the specified constraints.

Given, for example, the following set of integers $\{1,2,3,4\}$, how can you compute the number of all possible sequence scenarios, where a scenario consists of a number of sequences, as following ...
Dijenek's user avatar
0 votes
2 answers
681 views

How many ways of arranging 6 a's and 10 b's with no consecutive a's?

I think we can assume every b is a box and every a is a ball, and it looks like there are 10 boxes and 6 balls. So I think there are C(15 5) (15 choose 5) ways for the combination. But the correct ...
An Yan's user avatar
  • 131
1 vote
0 answers
152 views

Number of substrings - Combinatorics

Say you have two strings $A = a$ and $B = b$. Now, how do I come up with an expression that gives me the number of substrings of $C = abaa$ that contain atleast one occurrence of both $A$ and $B$? ...
Andrew Scott's user avatar
1 vote
2 answers
299 views

Unique combinations of datapoints into two bins? [closed]

I have a set of data of size $X$, say $X = 7$. I want to find all of the unique ways that the data can be grouped into two bins of a minimum size of two. For the example where $X = 7$, I have: ...
gettothenextscreen's user avatar
1 vote
1 answer
354 views

Random knapsack algorithm: Select n positive integers that sum up to S

Problem to solve: Have a list of M products (eg 100000) with various prices. I want to randomly select n products(eg 10) that their sum of prices is S(eg. 100). Duplicates are allowed or not, does ...
Jannes Botis's user avatar
1 vote
2 answers
60 views

Algorithm to pick sets to equal a given input of colored balls of different amounts

I have a specific problem and I am kind of stuck. Don't know exactly where to begin defining what it is. Is someone could just give me a nodge in the right direction or even better, tell me what kind ...
feggak's user avatar
  • 11
2 votes
2 answers
79 views

How to determine if two numbers can be used to arithmetically find any arbitrary number?

Say you had a scale, with two weights of two different values used to balance it. Is there any way to determine if two given weights could be used to weigh any arbitrary object? For example, say the ...
exosphere5's user avatar
1 vote
2 answers
639 views

Number of combinations of increasing tuples given their sum

A tuple is represented by $(a_i,a_{i-1},...,a_1)$ where $a_i<a_{i-1}$ and $i \in \{2...N\}$ So, valid tuples are $(1,2,3,4)$ and $(2,5,9,41)$ You are given the sum of these tuples $a_i + a_{i-1}...
user3112191's user avatar
1 vote
1 answer
308 views

2 variables "variable weighting" function

I have two variables $X,Y \in [0,1]$ and want to output some kind of weighted indicator based on these two. X is a raw indicator value where a low value indicates good health, and Y measures ...
lightlazer's user avatar
0 votes
1 answer
54 views

Minimum number of steps required to visit every "special" point on a rectangular gird

I am stucked at this problem: Suppose we have the following grid configuration (or matrix) $G\in \Bbb{M}^{\{0,x,y\}}_{m\times n}$ (I.e $G$ is a matrix that have $m$ rows and $n$ colums over the ...
MathNerd's user avatar
  • 2,517
4 votes
3 answers
511 views

Minimum number of steps required to visit every corner of a rectangular grid

I am stucked at this problem: Suppose we have the following grid configuration (or matrix) $G\in \Bbb{M}^{\{0,x,y\}}_{m\times n}$ (I.e $G$ is a matrix that have $m$ rows and $n$ colums over the ...
MathNerd's user avatar
  • 2,517

15 30 50 per page