Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I've read this interesting problem:
how many different passwords made up of a upper case letters, b lower case letters, c digits and d characters from this set {'$','%','!','&','#'} exist?
This could be used to suggest strong passwords.
This is a basic combinatorics problem.
First of all, you have two base 26 numbers of lengths a and b, a base 10 number of length c and a base 5 number of length d. You have to multiply the number of these numbers to the number of ways you can arrange them, so you get:
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
How to check the "Number of factors" of "n" is odd or even?
Only the perfect square numbers (i.e. 4,16,25....) have odd number of factors.
Others have even.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
Example:
Why sum(x)/sum(y) is not equivalent (equal) to sum(x/y)/n???
Suppose we have two values of x (3 and 6) and 2 values of y (5 and 11). Now sum(x)=9 and sum(y)=16, dividing them, we get 0.5625. Then we find sum(x/y). That would be (3/5)+(6/11)=0.6+0.5454= 1.1454. Dividing by n (2), we get the answer 0.57. So you see, sum(x)/sum(y) and sum(x/y)/n are two essentially very different things.
They might produce the same answer in some cases e.g. when y values are (5 and 10) but not always.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
I came across the following question: What is the smallest number n by which the given number x must be divided to make it into a perfect square?
n = find_number ( x )
I know the standard way to do this to find the prime factors of x and multiple by what is necessary to have perfect squares in the prime factors, but I saw this answer:
The number is 1/x so x/1/x= x^2
Not sure if that it completely wrong, or is a genius and direct solution
Thanks
no thats not correct ...
for 2 you say its 1/2 then 2 / (1/2) is 4 which is perfect square cool
but what about 1/8 then 2 /(1/8) is 16 which is perfect square
and 1/8 < 1/2 so thats one contradiction you need to know that thats not correct
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
3 Suppose there are seven coins, all with the same weight, and a counterfeit coin that weights less than the others. How many weighings are necessary using a balance scale to determine which of the eight coins is the counterfeit one? Give an algorithm for finding this counterfeit coin.
Two weighings will suffice – compare coins 1,2,3 to 4,5,6 first, then you'll have two or three coins for the second comparision.
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.