Determinate,if it's possible,p numbers of n binary digits,so any 2 of this numbers to match in exactly m positions.There must no be positions same digit to appear in all the p numbers.
1 <= p <= 25
1 <= n <= 25
1 <= m <= n
a number can start with 0.
If it's possible ,the result is 1,else 0.
5 5 3 1 //first 3 are p,n,m and the last is result.
8 9 5 0
9 9 7 1
6 10 4 1
12 12 10 1
7 15 11 0
10 20 16 1

Hi Yusuke00,

Can you show us what you have so far in the way of code?


I can't because i have no clue how to solve it.
Let's take the first example,5 5 3.

first number matches with 2 in 4
1-3 in 1
1-4 in 2

Is it that you don't understand what it is you're being asked to do, or that you don't know how to get started with the solution? If you really are completely clueless, and this is homework, you can always talk it over with your instructor. You can get help here, but you're expected to have a go at the solution yourself first.

Bob,this is a homework for me.I found the problem on a website and it looked interesting to me because i'm clueless.I understand what the problem asks,but i'm thinking of backtracking to generate all the solutions till 1 one them complete the requirements.I always make a code when i have an idea.But i don't have a certain idea till now.

So,No1 has a clue how to solve the problem?:(

In your above post, the user enters 5 5 3, then how are you getting those 5 binary numbers ?

The problem asks if it's possible,from all possible combinations,1 to aquire the requirements,so it's not just a check problem,it's about finding solution from all possible combinations of binary numbers.

So,No1 has a clue how to solve the problem?:(

I'm sure that's not the case. What's holding people back is that you're expected to have a go yourself first and so far you haven't made any attempt.

Can you post a link to the website you found the problem on? I'd like to see how the original problem was worded.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.