Jump to content
BrainDen.com - Brain Teasers
  • 0

Checker lines


BMAD
 Share

Question

Consider a rectangular M x N checker board and some checkers on it. What is the minimum number of checkers you should put on the board for any straight line parallel to any one of two sides of the board would cross some (at least one) checker?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

If I'm reading this right...

The minimum number of checkers would be equal to the larger of the two values.

c = # of checkers needed

c = m ((((m-n)/(|m-n|))+1)/2) + n ((((n-m)/(|n-m|))+1)/2)

This should work if m does not equal n, but will error out if m and n are equal. Not quite sure how to get around that in a closed form expression.

Link to comment
Share on other sites

  • 0

Here is the amended equation that should return the desired outcome of the larger of the two input values, m or n.

This assumes a few things:

  1. Given m and n, the largest value presented is the minimum number of checkers needed to be placed on the board.
  2. The factorial of a negative number will be equal to the negative value of the factorial of that number's positive counterpart. -z! = -(z!)
  3. The factorial of 0 equals 1.
  4. I haven't messed up anywhere.

*Items 2 and 3 are supported by WolframAlpha ( 0! = 1 ; -5! = -120 ; -6! = -720 ; -7! = -5040 ; etc... ), but don't seem to be uniformly accepted elsewhere.

post-43582-0-42412000-1362592302_thumb.gpost-43582-0-24761000-1362592303_thumb.g

Link to comment
Share on other sites

  • 0

Here is the amended equation that should return the desired outcome of the larger of the two input values, m or n.

This assumes a few things:

  1. Given m and n, the largest value presented is the minimum number of checkers needed to be placed on the board.
  2. The factorial of a negative number will be equal to the negative value of the factorial of that number's positive counterpart. -z! = -(z!)
  3. The factorial of 0 equals 1.
  4. I haven't messed up anywhere.

*Items 2 and 3 are supported by WolframAlpha ( 0! = 1 ; -5! = -120 ; -6! = -720 ; -7! = -5040 ; etc... ), but don't seem to be uniformly accepted elsewhere.

attachicon.gifmath1.gifattachicon.gifmath2.gif

why so complicated?

c=(m+n+|m-n|)/2

Link to comment
Share on other sites

  • 0

Here is the amended equation that should return the desired outcome of the larger of the two input values, m or n.

This assumes a few things:

  1. Given m and n, the largest value presented is the minimum number of checkers needed to be placed on the board.
  2. The factorial of a negative number will be equal to the negative value of the factorial of that number's positive counterpart. -z! = -(z!)
  3. The factorial of 0 equals 1.
  4. I haven't messed up anywhere.

*Items 2 and 3 are supported by WolframAlpha ( 0! = 1 ; -5! = -120 ; -6! = -720 ; -7! = -5040 ; etc... ), but don't seem to be uniformly accepted elsewhere.

attachicon.gifmath1.gifattachicon.gifmath2.gif

Comments on point 2. and 3.

The factorial of 0 is indeed 1 by convention.

As for the assumption (-z)! = -(z!) for a positive z, it is not true. Check out the gamma function, which is the extension of the factorial function to real and complex numbers. The gamma function is undefined at non-positive integers. I suspect Wolfram Alpha is interpreting your testing inputs as -1 * (z!). For instance, -1*(5!) = -120 ; -1*(6!) = -720 ; -1*(7!) = -5040.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...