Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:52:40+00:00 2026-06-14T05:52:40+00:00

Suppose I’ve a square of size (2n+1)x(2n+1) for some n i.e. a square with

  • 0

Suppose I’ve a square of size (2n+1)x(2n+1) for some n i.e. a square with odd side length.
Starting from the centermost cell I’m interested in counting the no. of ways of reaching any edge cell(as shown in the following figure).
Only non-overlapping paths are allowed i.e. we can not revisit a cell if it has been visited already.

Following Figure shows a square with side 9(n=4) and two possible paths of length 5.

Image

I think all paths will be of length range: [n to (2n-1)^2+1 ]
Counting no. of Paths of Length:
1 – 0
2 – 0
3 – 0
4 – 4
5 – 32
6 – …?
But as the Path length increases I can’t seem to unwrap all the possibilities. I know the symmetry comes into play here but is there any structured way to count all the paths?

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:52:41+00:00Added an answer on June 14, 2026 at 5:52 am

    To find paths that start at the center of the square board and finish at the borders, you can use a tweaked DFS (Depth First Search) where you will store already visited tiles so you don’t step on them again.

    There is indeed a lot of symmetry in the board. You can divide the number of searched paths by 4 just by noticing that:

    • Starting from the center, you can go Up, Down, Left, Right
    • All the paths that start going Up generate all other paths starting Down, Left, Right by rotation

    Once you do that, you can go further by noticing that:

    • Once you’ve gone U, you can go U, L or R
    • All paths generated when you go L are the same ones generated when you go R by mirror symmetry.

    You can repeat this several times until you reach the border of the square. The full amount of paths starting by going U will be:

    • U-U-U-U (one path)
    • 2 times paths starting with U-U-U-L
    • 2 times paths starting with U-U-L
    • 2 times paths starting with U-L

    Once you count those, you have the full amount of paths by multiplying by four.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a class Baz that inherits from classes Foo and Bar ,
Suppose I have a module which defines some basic constants such as integer, parameter
Suppose I have a grid of squared defined like so in a class: Square
suppose we have this next sample code: while(some condition){ lock1.lock(); . . } the
Suppose I have this animation that start at some point : myElement.animate({ top: -currentTempImageX,
Suppose you have 2 different ASP.NET applications in IIS. Also, you have some ASCX
Suppose that I have an n -sided loaded die, where each side k has
Suppose I have this function: void func() {} When I call func with some
Suppose I have a C# thread doing some blocking IO and waiting for it
Suppose I have multiple resource dictionaries and some resources have Dynamic/StaticResource references to resources

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.