Skip to main content

All Questions

7 votes
1 answer
387 views

Robot moves from $(x,y)$ to $(x+y, y)$ or $(x,x+y)$

I was working on some coding related to this topic I found on Stack Overflow. This lead me to a math problem I thought would be interesting. I was wondering if one was given a starting point, what ...
cruiseking's user avatar
5 votes
3 answers
5k views

How many ways to reach $Nth$ number from starting point using any number steps between $1$ to $6$

In a board game, dice can roll either $1, 2, 3, 4, 5$ or $6$. The board has $N$ number of space. Every time of dice roll randomly, pawn moves forward exactly to dice rolled a number. Now the problem ...
Iqbal's user avatar
  • 63
5 votes
0 answers
121 views

Partition problem where partition are in increasing order.

For given $n$ and $S$, how many possible combinations are there such that: $x_1 + x_2 + .. + x_n = S $ $\forall i, x_i \leq x_{i+1}$ $\&$ $x_i \geq 1$ For example, if $n$ = 3 and $S$ = 5, there ...
Srinath's user avatar
  • 51
4 votes
1 answer
252 views

Maximum number of iterations of a simple algorithm

Suppose there is a 0-1 string of length n. We can perform the following operation on the string: We can choose two zeros and invert the subsequence between them. The inversion includes the two zeros ...
Joseph's user avatar
  • 65
3 votes
2 answers
191 views

Guaranteed graph labyrinth solving sequence

Starting from a vertex of an unknown, finite, strongly connected directed graph, we want to 'get out' (reach the vertex of the labyrinth called 'end'). Each vertex has two exits (edge which goes from ...
user555076's user avatar
3 votes
1 answer
115 views

From three integers, choose any two and replace one of them with the two numbers' mean. Show that we can obtain equal integers.

Let $a, b, c$ be three distinct positive integer numbers on a whiteboard. At each step, I choose two of them and I replace one of the two numbers with their arithmetic mean. For example: I choose $a, ...
ale's user avatar
  • 1,768
3 votes
1 answer
808 views

number of derangements

In the normal derangement problem we have to count the number of derangement when each counter has just one correct house,what if some counters have shared houses. A derangement of n numbers is a ...
user103260's user avatar
3 votes
2 answers
160 views

Most efficient algorithm to distribute n n-bit strings among n people

We are given $n$ people, whom we identify with the elements of $[n]=\{1,\ldots,n\}$. We are also given a finite collection $\mathcal{K}$ of subsets of $[n]$. The problem is to (efficiently) ...
candrian's user avatar
3 votes
1 answer
58 views

Finding a recursive definition and computing $B(10)$

For $n \geq 1$, let $B(n)$ be the number of ways to express $n$ as the sum of $1$s and $2$s, taking order into account. Thus $B(4) = 5$ because $4 = 1 + 1 + 1 + 1 = 1 + 1 + 2 = 1 + 2 + 1 = 2 + 1 + 1 = ...
Timonse's user avatar
  • 139
3 votes
2 answers
194 views

Google Question: Number of ways to select sets such that n is pure

Consider a subset $S$ of positive integers. A number in $S$ is considered pure with respect to $S$ if, starting from it, you can continue taking its rank in $S$, and get a number that is also in $S$, ...
user103260's user avatar
3 votes
0 answers
461 views

Count number of m-subsets with xor = 0 [closed]

Given positive integers $n$ and $m$, count the $m$-subsets $S\subseteq[2^n - 1]$ such that the bitwise XOR of the members of $S$ is $0$, where as usual for any positive integer $k$ we let $[k]=\{1,2,\...
sooobus's user avatar
  • 740
2 votes
4 answers
266 views

How many numbers are there for a $16*16$ matrix

Consider all matrixes with $1,0$ if all the numbers are $1$ we define $S=1$ and if all the numbers are $0$ then $S=0$ if non of them happened then we divide it into $4$,$2^{n-1}*2^{n-1}$ matrixes and ...
Taha Akbari's user avatar
  • 3,568
2 votes
2 answers
215 views

Combination/Permutation Question

I'm trying to solve a programming challenge, and I have narrowed down all the challenge to a combination/permutation problem. I ended up with 5 possible scenarios, and I need to find all possible ...
ILikeTacos'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
1 answer
61 views

How can i distribute the money in the fewest movements? [closed]

I am trying to evenly distribute the total amount to each person involved. For example I will use money. Example 1 Person A has $20 Person B has $40 Person C has $60 So to make everything even ...
Jason Burton Phant0mPhr3ak's user avatar

15 30 50 per page