difficult problem

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
nghiank
New poster
Posts: 31
Joined: Wed Nov 20, 2002 3:10 pm
Contact:

difficult problem

Post by nghiank »

test?
Last edited by nghiank on Sun Apr 22, 2007 3:41 pm, edited 1 time in total.
Miguel Angel
Learning poster
Posts: 60
Joined: Tue Aug 13, 2002 2:39 am
Location: Mexico

Don't understand your statement of the problem

Post by Miguel Angel »

Tell how many 2x2 matrix there are with the condition above or
Tell how many AxB matrix there are such that doesn't contain a 2x2 matrix with the condition above?
:D Miguel & Marina :D
Shahab
New poster
Posts: 24
Joined: Sun Nov 10, 2002 2:17 pm

Post by Shahab »

Hi, nghiank

I can't understand your definition of the problem. Can you have some example matrices that satisfy this condition and that don't satisfy it?

Sincerely yours,
Shahab Tasharrofi
junjieliang
Experienced poster
Posts: 169
Joined: Wed Oct 31, 2001 2:00 am
Location: Singapore

Post by junjieliang »

Ok, this is how I understand it (but I can't solve it):

You have a matrix n*m, containing either 0 or 1. Out of the 2^(n*m) matrices, how many do not contain a 2*2 square with all 1s or 0s?

E.g.:

011
011
101

Contains a 2*2 square with 1s...

Which is why for same input, output is 14 (16 - all 1s and all 0s).

Does this help?
Post Reply

Return to “Algorithms”