Interesting 8x8 chess board counting problem

Click For Summary

Discussion Overview

The discussion revolves around a combinatorial problem involving a rook on an 8x8 chessboard, specifically focusing on the number of distinct paths the rook can take from the bottom left corner to the top right corner while only moving up and to the right. The conversation explores various approaches to solving this problem, including numerical methods, combinatorial reasoning, and recursive relationships.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes that if the rook can only move one square at a time, there are 2^{14} possible routes.
  • Another participant challenges this by stating that the rook can move multiple squares at once, leading to a more complex counting problem.
  • A different participant suggests that the number of paths can be calculated using combinations, specifically the number of combinations of 14 things taken 7 at a time, which relates to the one-step-at-a-time scenario.
  • One participant describes a recursive approach to calculate the number of paths, defining a function f(n,m) to represent the number of ways to traverse an n by m rectangle.
  • Another participant notes a pattern resembling Pascal's triangle in the number of paths to various squares on the board.
  • Several participants arrive at the numerical value of 3432 for the total number of paths, with some expressing surprise at the consistency of this result regardless of the rook's movement constraints.
  • There is a discussion about the difference between counting sequences of moves versus distinct paths, with some participants clarifying their interpretations of these terms.

Areas of Agreement / Disagreement

While some participants agree on the numerical result of 3432 paths, there is no consensus on the methods used to arrive at this conclusion, and multiple approaches and interpretations of the problem remain present throughout the discussion.

Contextual Notes

The discussion includes various assumptions about the rook's movement and the counting methods, with some participants noting the limitations of their approaches and the need for clarification on terms used.

  • #61
To jbriggs444.
Good, good, good.
So in every element of the array, there is a number. And the number represents how many path to the solution. In the end it's a matter of memory vs process. I remember the case once in finding prime number.
Well, well, well, jbriggs444, you never cease to amaze me!.
I always find good explanations from you!.
I don't know whether you're a good scientist, physicist or a good computer programmer.
But one thing for sure, you're a damn GOOD TEACHER!. Bravo!
 
Mathematics news on Phys.org
  • #62
#!/usr/bin/perl
#
# Iterative approach. Populate n by n array
#
Foolish of me. Of course, perl!
 
  • #63
Code:
for $i ( 1 .. $row-1 ) {
  $ways = $ways + $count[$i][$column];
};
for $i ( 1 .. $column-1 ) {
  $ways = $ways + $count[$row][$i];
};
I'm sorry jbriggs444,
I think that line of code should be changed to:
Code:
if ($Row>1) $ways = $ways + $count[$Row-1][$column];
if ($Col>1) $ways = $ways + $count[$Row][$column-1];
Thanks for your explanations!

For QueenMode

Code:
if ($Row>1) $ways = $ways + $count[$Row-1][$column];
if ($Col>1) $ways = $ways + $count[$Row][$column-1];
if ($QueenMode && ($Row>1) && ($Col>1)) $ways = $ways + $count[$Row-1][$column-1];

Ahhh, PhysicsForums is suck!
Why there's no "Pascal" option in insert code. From all languages, they have FORTAN! :smile:
 
  • #64
Stephanus said:
Code:
for $i ( 1 .. $row-1 ) {
  $ways = $ways + $count[$i][$column];
};
for $i ( 1 .. $column-1 ) {
  $ways = $ways + $count[$row][$i];
};
I'm sorry jbriggs444,
I think that line of code should be changed to:
Code:
if ($Row>1) $ways = $ways + $count[$Row-1][$column];
if ($Col>1) $ways = $ways + $count[$Row][$column-1];
That depends on what problem you are trying to solve. The program correctly solves the problem it was intended to solve. That problem being finding the number of distinct sequences of [eastward and northward] rook moves that can go from one corner to the other of an i by j chessboard.

If you want to determine the number of paths, the recurrence does indeed become much simpler. The distinction between the number of paths and the number of sequences of moves has been pointed out multiple times in this thread.
 
  • Like
Likes   Reactions: Stephanus
  • #65
You are on 1,1 to get on 8,8 you have to move 7 steps along x-axis and 7 steps along the y axis. Since we can't "back off" therefore whenever we will make a move we will add "1" to the value of x or that of y. Let's write "x" for move along x axis, and "y" for that along y axis. Now each possible path can be associated uniquely with a sequence of seven x's and seven y's. e.g., xxxyyyxyxyxyyx is one the possible path, fortunately there is one to one correspondence between the possible arrangement and no. of paths, now finding former is simple its just purmutation of 14 thing seven of one kind and rest of other kind, this no. is just equal to 14!/7!*7!.
On solving gives 3432.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
8K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
5K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
16K