Talk:Zig-zag matrix: Difference between revisions

→‎Pattern of memory addresses: Previous pattern searches.
(→‎Pattern of memory addresses: Previous pattern searches.)
 
(One intermediate revision by one other user not shown)
Line 454:
== Pattern of memory addresses ==
 
If we assume that each entry is stored consecutively in memory like so (using size 5 as an example), and assuming an 8-bit computer where each memory address holds a byte and each address is 16-bit:
 
<pre>;these are memory locations, the values within are as in the example.
Line 500:
If you remove the <math>k^2</math> and +1 after it, the sequence is symmetric.
 
Might be helpful for establishing a pattern. I'll work on it more later. This logic should extend to 32-bit CPUs if you multiply N and K by 4.--[[User:Puppydrum64|Puppydrum64]] ([[User talk:Puppydrum64|talk]]) 17:06, 15 September 2021 (UTC)
 
:Hi Puppydrum64; at the top of the talk page the author of the J example talks about his solution that exploits patterns in indices. I just noticed that sort was involved and worked out something for the Python entry and explained it in my blog: [http://paddy3118.blogspot.com/2008/08/zig-zag.html paddy3118 blog explanation].
 
: There ''are'' patterns to be found :-)
: --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:44, 18 September 2021 (UTC)
Anonymous user