-1
votes
0answers
57 views

Sum of possible permutations

Lets call two arrays A and B with length n almost equal if for every i (1 <= i <= n) CA(A[i]) = CB(B[i]). CX[x] equal to number of index j (1 <=j <= n) such that X[j] < x. For two ...
2
votes
0answers
205 views

Count swap permutations

Given an array A = [1, 2, 3, ..., n]: ...
-1
votes
1answer
33 views

Combinations and Permutations. integer solutions [closed]

(a) How many integer solutions are there to the equation $x + y + z = 15$ if (i) $x$, $y$, $z$ are non-negative? (ii) $x$, $y$, $z$ are positive? (iii) $x$, $y$, $z$ are non-negative and $z \leq 5$? ...
1
vote
4answers
168 views

How many of these numbers are divisible by 4?

There is this question that I have no idea where did I make the mistake. Each of the digits 1,1,2,3,3,4,6 is written on a separate card. The seven cards are then laid out in a row to form a 7-digit ...
5
votes
1answer
88 views

Filling in blanks in a multiplication problem knowing only the set of digits in the product and that 9 divides each factor

The 5774 Ulpaniada (part 2 of it) includes the following question: The following multiplication exercises uses all $9$ digits $1,2,3,\ldots,9$. The digits are encoded by asterisks. We are told ...
1
vote
2answers
118 views

Number of ways in which a composite number can be resolved into 2 coprimes? [duplicate]

for example 210 = 2*3*5*7,number of relative primes is 2*(4-1) =8,please help me derive this result.here's my try = 4C0+4C1+4C2+4C3+4C4=2*4 .Since nCr = nCn-r we decide this by two.4C0 couples with ...
1
vote
3answers
79 views

Distribute Gifts among students

$N$ students are to be provided with gifts We know that the $i$'th student wants to get at least $a_i$ gifts. The teacher wants to give distinct gifts meaning if he give $x$ gifts to one student then ...
5
votes
1answer
179 views

Numbers permutation

Given $n$ numbers and $k$ positions I want the total number of permutations of these n numbers on these $k$ positions if repetition is allowed and if the following two arrangements are considered ...
1
vote
1answer
122 views

Number of ordered pairs $(x,y)$ with $x,y \in \{ 1, \dots, N\}$ such that sum of numbers in pairs is divisible by $k$?

Given $N$ and $k$. Find the number of ordered pairs $(x,y)$, with $x,y \in \{ 1, \dots, N\}$ such that sum $x+y$ is divisible by $k$. and x less than y. example $N=10, k=4$ answer = $10$ Pairs- ...
2
votes
1answer
74 views

Show that the function $p(k)=k+(-1)^kc$ is a permutation of the set of all integers

This problem is from the book "Concrete Mathematics (2nd) written by Graham, Knuth and Patashnik" Show that the function $p(k) = k+(-1)^kc$ is a permutation of the set of all integers, whenever ...
1
vote
2answers
137 views

Is there a formula in permutations and combinations if we are to find the sum of number of 1's in binary expansion of a number from 1 to n

We are given $N$. Suppose $f(x) =$ number of $1$'s in the binary expansion of $x$. We have to calculate $f(1) +f(2) +f(3)+ \dots +f(N)$. So is there a formula for this sum directly in terms of ...
3
votes
2answers
173 views

How many solutions are there to $abc+def=ghi$, where $a,b,\ldots, h,i$ are distinct non-zero digits?

I saw this problem posted by Google. Those posting in the comments found solutions using computer programming. I would like to know if there is an easier solution than trying every single combination. ...
4
votes
2answers
209 views

“Randomize” output of a Linear Feedback Shift Register for the same taps?

I'm using a (Galois) LFSR to sample a large array, ensuring that each entry is only visited once. I simply skip past the entries that exceed the array length. With the same taps then the array entry ...
1
vote
1answer
262 views

How many permutations are there from x bits to y bits?

Can you have a permutation function where the size of the domain isn't the size of the range? I know the number of permutations from x bits to x bits is $2^x!$, but if you can permute x bits to y ...
0
votes
1answer
123 views

Total number of ways to arrange the prime divisor of a number so it can be written using M digits

How many ways we can arrange all the prime divisor of a number so it can be written using M factors, where M <=T. T is the total number of prime divisor of the give number N. Example:N=27, its ...
7
votes
2answers
552 views

Number of permutations which fixes a certain number of point

Given the set $N:=\{1,\cdots,n\}$, let $\pi$ be a permutation on $N$. We say $i \in \{1,\cdots,n\}$ is fixed by $g$ iff $\pi(i)=i.$ Denote the set of all permuations on $N$ by $S_n$. Define $f :~N ...
0
votes
2answers
54 views

Jacobi symbol and invertibility of $m$ for an odd $n$

I have asked a similar question here before, and received a nice answer. I think that the next question here is equivalent, but can't seem to be able to prove it. Here goes: Given an odd $n$, I want ...
1
vote
0answers
107 views

How many ways to fill the $N \times N$ board by nonnegative integers, such that sum of the numbers of each row and each column is $R$?

How many ways to fill the $4 \times 4$ board by nonnegative integers, such that sum of the numbers of each row and each column is $3$? I wrote a brute-force and got $2008$ which seems to be the ...
0
votes
1answer
514 views

How to arranged two or more different colored blocks in all possible ways?

Is any algorythem that can arrange two or more different blocks in all possible ways.. in series (rows and columns.)? If I have two colored(red and blue) blocks and I try to arranged in one possible ...