Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
is it possible to calculate inverse of A-B, i have calculated inverse of A and B already.
No, the inverse of A-B is not a nice function of the inverses of A and B. (Of course it's possible to calculate -- if you have the inverses of A and B then you can calculate A and B, hence A-B, hence the inverse of A-B -- but, assuming you knew A and B anyway, knowing their inverses too doesn't help you calculate A-B more efficiently or accurately.)
There are some special cases where you can do something useful. For instance, if one of the matrices has rank 1 then this is basically the Sherman-Morrison formula. But in general you're out of luck.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
In A* algorithm, if g=0 and h=0 then what will be the result of f?
I know f(x)=g(x)+h(x). So it is true that f(x) will be zero?
f(x) would be 0.
But this should hardly ever occur.
g(x)=0 means you had no costs to reach x (should only be the case for the starting point)
h(x)=0 means the heuristics says that the costs to reach the goal from x costs not more than 0 (means that you are at the goal)
so f(x)=0 should only be possible if you start at the goal.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I know the number of combinations is called nCr, but what about all the exact outcomes?
For example:
I have 3 elements a,b,c and for the param 2, I will have outcomes
ab
ac
ba
bc
ca
cb
I want to search different implementations of this. but I don't know what term should I input in google.
Just realized your question is basically wrong.
You are speaking about combinations yet you are expecting results like "ab" and "ba". A basic property of combinations is the fact they are unordered, that is, for a set {a, b, c}, 2-combinations will be {ab}, {ac}, {bc}, nothing else.
The term you are looking for is a variation or partial permutation. For variations, the order of elements matters.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
This question is a practice problem on interviewstreet.com.
Find number of integral solution of 1/x+1/y=1/N! for a given N
For N=1 answer is 1.
I tried to solve this questions , but cant predict from where to start. I am not from math background.
I am looking for the approach , how should I proceed towards the solution.
Is there any direct formula for this?
Try to solve it as a iterative problem. All the solutions of N-1 are also valid for N. The only uncovered solutions are where x and y are both not divisible by N, which should be easier to count.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
There are n bins and m balls. Balls are with different weights, say ball i has weight w_i. Is there an algorithm that assigns balls into x<n bins so that maximal load of these bins is minimized.
This is equivalent to the multiprocessor scheduling problem, which is NP-complete. In other words: algorithm(s) exist, but they are very slow.
This is a disguised hash function question. i.e. You are looking for an optimal hash function. Check out this page - http://en.wikipedia.org/wiki/Hash_function
Generally you want a random key that you can XOR with w_i then take the result mod n to get the bin number.
Note: I took maximal load to mean number of balls per bin. Hashing of course does not work if you want to minimize the weight of each bin.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
does gcd(gcd(a,b),gcd(c,d)) equal gcd(a,b,c,d)?or how can i calculate gcd of 4 number?
yes that is correct. If you are finding the gcd of (a,b,c,d) then any split should work. So gcd(a,b,c,d) = gcd(gcd (a,b) , gcd(c,d))
Yes. GCD(a,b,c,d) = GCD(a, GCD(b, GCD(c, d))) (or any other order, its associative and commutative.) Oh, and just in case you didn't know, you can use the Euclidean algorithm to compute GCD very quickly.