Skip to main content

All Questions

6 votes
4 answers
3k views

What's the number of decibinary numbers that evaluate to given decimal number?

Let's define a decibinary number system, where each bit (or digit) can range from $0$ to $9$, but it's place value corresponds to the one in the binary system. For example: $$(2020)_{decibinary} = 2 \...
Tomasz Bartkowiak's user avatar
6 votes
1 answer
317 views

Math behind this SQL problem

I have the following 'sorted by row' lists (2nd column), in which every row produces an output (3rd column, and 4th column). This output has been found without using formulas and it represents a ...
user1630809's user avatar
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
4 votes
0 answers
159 views

Finding simple algorithm to combine students into different groups

I'd like to find an algorithm as simple as possible to solve the problem below. The same seven students will each day be divided and meet into two groups, one with four students and one with three. ...
Zoe's user avatar
  • 41
3 votes
2 answers
3k views

Sum of multiplication of all combination of m element from an array of n elements

Suppose I have an array {1, 2, 3, 4} and m = 3. I need to find: ...
user148664's user avatar
3 votes
2 answers
246 views

Maximum number of seating plans

15 people will be seat in a row of 15 chairs. Two seating plan are considered the same if two plans share same adjacent quadruples. What is the maximum number of seating plans can be made? For ...
Jonathan's user avatar
2 votes
1 answer
293 views

Counting permutations, with additional restrictions

There are 10 slots and some marbles: 5 red, 3 blue, 2 green, how many ways can you fit those marbles into those slots? Those marbles fit in 10!/(5! 3! 2!) ways ...
William Entriken's user avatar
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
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
2 votes
0 answers
82 views

Revealed preference rank rule: variation on horse race problem

Suppose there are x number of objects to be ranked. Then there are x[(x-1)/2] possible comparisons of these objects. Only subsets of x can be evaluated for comparisons and there is always one most and ...
user3290799's user avatar
1 vote
2 answers
71 views

Looking for an algorithm

I have a very long "list" of numbers ( maybe thousands ) which may be grouped, by sum into "n" groups. The number of groups and values are given. For example: List of numbers: [1, ...
Doktop Aibolit'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
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
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

15 30 50 per page