Thanks - so, knowing solution was possible in seconds, I cleaned up my
approach, also using blocks, but specifiying their size in advance.
Rather surprisingly, it's somewhat faster than Raul's - maybe because
it
keeps more constant data between block-loops.
It uses that property I tried e
That problem took a lot of reading!
Like you, Brian, I started with the boustrophedon cycles:
example NB. my data has 2 rows: depth,: range:
0 1 4 6
3 2 4 4
(Brian forms the data into a simple vector of ranges
3 2 0 0 4 0 4 )
My verb, cycle, is used to assemble a look-up table of scan po
Erling Helenas, Raul Miller, and others have come up with various
methods to generate subsets of “restricted generating functions” (RGFs)
suitable for the production of partitions of sets. Several of these
have used Ruskey’s algorithm.
I’ve found a fairly simple approach which has the benefi
arger array. I’ll post separately a reasonably “constructive”
approach, which is closer to Raul’s method in performance, I think.
>Mike
>
>Please reply to mike_liz@tiscali.co.uk.
>Sent from my iPad
>
>> On 29 Oct 2017, at 19:37, Erling Hellenäs
wrote:
>>
>&
Here’s my attempt at a constructive approach. In haste, as Liz wants
to get away from this WiFi spot! So no time for explanation... and I
haven’t had an opportunity to digest Erland’s improvement to my
improvement to Lippa Esu’s verb. Sorry for brevity.
constructpart =: 3 : 0
:
d =. y
m
Mainly for Jon Hough
This thread concerns Project Euler problem number
484; see
https://projecteuler.net/problem=484
I've done it at last, more than
a month after Jon reminded me. I'm solver number 96,
so it's
evidently quite difficult, considering the problem was posted last
October.
My
Yes, it's very satisfying, isn't it.
Mind you, your sticky tabs
probably need to have a
more practical size when N is >> 5 !
Did you
see my more recent offering re user-specified
nets? (7/7/15)
Perhaps
not elementary enough for your demonstration
project/s.
Cheers,
Mike
On 13/07/20
Problem 484 is still on my to-do list. I haven't looked at it in a
while, but
my working script includes a remark:
NB. ... suggests a
sieve might be ok - but for 5e15!!!
Also, I seemed to be trying to
use a moebius function or
Moebius' Theorem...
As I haven't managed to
solve it yet,
Problem 484 is still on my to-do list. I haven't looked at
it in a
while, but my working script includes a remark:
NB. ... suggests a
sieve might be ok - but for 5e15!!!
Also, I seemed to be trying to
use a moebius function or
Moebius' Theorem...
As I haven't managed to
solve it yet,
What overflow problem I thought when I came up with
add32 =: 65521&|@:
+ NB. add modulo 65521
a32mdslow =: ((1 add32{:)(+ 16 (33 b.)])
(#add32(add32/)))@:(add32/\)@(a.&i.)
and then I tested it on modest
size input and found it was ORDERS
of magnitude slower than Bill's
loopy version!
So
nd
any in this one!
On 13/08/2014 23:02, Joe Bogner wrote:
> On Wed, Aug
13, 2014 at 5:56 PM, mike_liz@tiscali.co.uk
> wrote:
>
>> Isn't it more useful to produce a keyed table of
cumulative
>> frequencies?
>> eg:
>>(~.,.(((%{:)@:(+/\)))@:(#/.~))2
2
I'm not sure if your data is guaranteed sorted.
If it is, then this
seems ok:
ecdfsorted =: (# (% {:)@:(+/\))@:(#/.~)
It's pretty fast
for i.1e5
Otherwise, you need to sort first:
ecdfunsorted =: (#
(% {:)@:(+/\))@:(#/.~)@:/:~
Slightly slower.
I'm a bit puzzled
though, in that
Maximum (of 10 goes using Roger's snapshot) 2.45567
Minimum 1.65141
(!)
Samsung Ultrabook NP540U3C
Intel i3-3217U CPU 1.8 GHz 2 Cores 4
logical processors
6 GB memory
JVERSION
Engine: j701/2011-01-10/11:25
Library: 8.02.10
Qt IDE: 1.1.3/5.3.0
Platform: Win 64
Installer: J802
install
InstallP
Thanks.
Yes, you're right about the precision. I'd been using an
extended integer form of the matrix when using modulus 4 p: 1e8 .
It's reassuring to see that if
datatype MAT
boolean
then
datatype MAT(1 mMpower)1
integer
Your ppp is about
three times faster than my
14 matches
Mail list logo