[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

32x32 grid

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 7

File: grid.png (8KB, 545x545px) Image search: [Google]
grid.png
8KB, 545x545px
Given a n by n grid, what's the longest path between the cells such that the path does not overlap and no path cell is adjacent to more than 2 other cells (the one it go to, and come from). The start and end of the path may be placed anywhere on the grid. (I'm specifically interested in a 32x32 grid)

No, not homework, just very curious.
>>
A zig-zag pattern (all the way along a row, then dow two, then all the way along a row the other way) starting in the top left and ending in the bottom left would get you out of a total of 1024 grid, so a little over half.

A spiral would be another good solution but I'm not sure how to calculate that
>>
>>9124832
Thanks a lot for replying however i was just looking for a more mathematically rigid answer though.
>>
>>9124817
hilbert curve
>>
File: infinitode.png (336B, 95x35px) Image search: [Google]
infinitode.png
336B, 95x35px
>>9124896
Wouldn't a hilbert curve fill all of space? That wouldn't work, seeing as I'm looking for the path that's not directly adjacent to it self.
>>
File: Untitled.png (9KB, 545x545px) Image search: [Google]
Untitled.png
9KB, 545x545px
>>9124817
>>
>>9124962
why not diagonal all the way?
>>
>>9124977
Doesn't work on the edges :/
>>
File: diagonal.png (468B, 512x512px) Image search: [Google]
diagonal.png
468B, 512x512px
>>9124962
Building on this.

The diagonal lines are obviously the best use of space for the middle, but the edges complicate things.
>>
File: 1503511987436.png (3KB, 528x528px) Image search: [Google]
1503511987436.png
3KB, 528x528px
>>
>>9125029
This guy's on point : https://en.m.wikipedia.org/wiki/Hilbert_curve
>>
>>9125035
Except it's likely not optimal under those rules.
This one >>9125029 has 32 black cells in each 8x8 cluster so half the cells are black.

In the diagonals >>9125020 except for the edges two-thirds of the cells are black.
>>
File: infinitode.png (8KB, 545x545px) Image search: [Google]
infinitode.png
8KB, 545x545px
>>9125020
Came to this, i think it's slightly better.
What'cha guys thing?
>>
File: diagonal.png (692B, 512x512px) Image search: [Google]
diagonal.png
692B, 512x512px
I think this is the best you can do, 650 cells filled. I've shaded the edges so it's easier to see the patterns.

The middle is two thirds full, the edges are a little over half full: 127/240, with the extra seven coming from the way the corners work out.
Thread posts: 14
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.