Search found 4 matches

by tytus
Sat Feb 12, 2005 12:06 pm
Forum: Algorithms
Topic: Integer as sum of two squares of integers
Replies: 1
Views: 1535

Integer as sum of two squares of integers

How to check if given integer n can be represented as sum of two squares of integers??
I know that:
a)Those numbers n whose prime divisors of the form 4*m+3 divide n an even number of times can be written as the sum of two squares.
b)Jacobi's Two Square Theorem: The number of representations of a ...
by tytus
Sun Jan 30, 2005 9:08 pm
Forum: Algorithms
Topic: Number of n-element permutations with exactly k inversions
Replies: 2
Views: 1599

Number of n-element permutations with exactly k inversions

How to find number of n-element permutations with exactly k inversions?? (n,k are given)
by tytus
Wed Nov 17, 2004 9:33 pm
Forum: Algorithms
Topic: Number with fraction conversion...
Replies: 1
Views: 1324

Number with fraction conversion...

Is there any fast algorithm to convert numbers with fractions (very big numbers - up to 400 digits) between different bases (where the base ib is 2<=b<=36)??
For example:1100,1100 (base 2) to number with base 7...



PLEASE HELP!!!
by tytus
Wed Nov 17, 2004 9:30 pm
Forum: Algorithms
Topic: From inversion back to permutation...
Replies: 0
Views: 910

From inversion back to permutation...

I would like to ask for fast algorithm for getting back from inversion to permutation. Inversion is a pair of indexes {i,j} make an inversion when (i<j) AND (Ai>Aj), and I would like to find the permutation from which inversion has been created:


For example:

Input: 0 0 1 2 1 1 5 6
Output: 1 8 5 4 ...

Go to advanced search