S.O.S. Mathematics CyberBoard Forum Index S.O.S. Mathematics CyberBoard
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
pls help !!! Really strange question

 
Post new topic   Reply to topic    S.O.S. Mathematics CyberBoard Forum Index -> Probability and Statistics
View previous topic :: View next topic  
Author Message
possofty
S.O.S. Newbie


Joined: 05 Nov 2009
Posts: 3

PostPosted: Thu, 5 Nov 2009 16:58:11 UTC    Post subject: pls help !!! Really strange question Reply with quote



On a standard chessboard how many different ways can you select a block of five neighbor squares?
Two squares are neighbors if they have a common side.
(If the problem was asked for a 3x3 board the answer would be 49.)

I know a way to solve that problem but i think it is too long. i draw every possible position. then i calculate how many possiblity are there.
But my boss said me that it can be calculated to easily with a little code ( written by C,C++,C#...). So Does anybody have an idea ? (formulas, algorithm exc...)

Thank you..
Back to top
View user's profile Send private message
Ilaggoodly
Moderator


Joined: 15 Feb 2007
Posts: 687
Location: Bonn, Deutschland

PostPosted: Thu, 5 Nov 2009 17:36:04 UTC    Post subject: Reply with quote

You could think of the different possible shapes that arent isomorphic under rotation, and count how many of each are possible, and then consider rotating them.

Don't think thats what your "boss" had in mind though
_________________
Back to top
View user's profile Send private message
aswoods
Member of the 'S.O.S. Math' Hall of Fame


Joined: 23 Feb 2009
Posts: 524
Location: Adelaide, Australia

PostPosted: Thu, 5 Nov 2009 23:16:23 UTC    Post subject: Reply with quote

Suppose that you have a fixed shape to place on the chessboard. If you can't rotate it, then the number of places it can go is easy to figure out. Enclose it in the smallest possible rectangle, then work out where the rectangle can go.

For example, a 2x3 rectangle can be placed in (9-2)*(9-3) = 7*6 = 42 positions.

http://en.wikipedia.org/wiki/Pentomino

There are eighteen one-sided pentominoes. Including rotations, there are 63 different shapes to consider, but you can make the task easier by working out the positions for each of the original eighteen, then multiplying by 4, or 2, or 1, depending on how many distinct shapes are produced by rotating it. (This works because the chessboard is a square, so (9-m)*(9-n) = (9-n)*(9-m).)

If you want to write a program, the normal algorithm for counting polyominoes is described here. But I don't think it's needed.
Back to top
View user's profile Send private message
possofty
S.O.S. Newbie


Joined: 05 Nov 2009
Posts: 3

PostPosted: Fri, 6 Nov 2009 07:47:19 UTC    Post subject: Reply with quote

so the easiest way is that i think
"There are eighteen one-sided pentominoes. Including rotations, there are 63 different shapes to consider"
Thanks for you help and giving attention to my question Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    S.O.S. Mathematics CyberBoard Forum Index -> Probability and Statistics All times are UTC
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2010 phpBB Group.
Installation and all modifications: H. Knaust
Copyright © 1999-2010 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA