A humble request/challenge

177 views
Skip to first unread message

Jabari Zakiya

unread,
Aug 8, 2017, 5:46:21 PM8/8/17
to golang-nuts
Hi

I primarly use Ruby for math/science problems/projects because it's so easy to program in, and it allows me to think about how to solve problems without worrying about how to code it. I've also played around with Crystal (aka Ruby on steroids) but it's still young, and doesn't let me (currently) do what I want, or without a lot of hassles, and I've just recently started looking at Nim (less than a month at time of writing).

I heard about Go for sometime but never had any time/reason to learn it.  But now maybe I have incentive to do so.

I developed a prime sieve called the *Sieve of Zakiya (SoZ)*, and it's companion the *Segmented Sieve of Zakiya (SSoZ)*. I wrote a paper, **The Segmented Sieve of Zakiya (SSoZ)** which describes its mathematical foundations and algorithm, and provide a working C++ implementation at the end of the paper (compiled, run, and verified), though I don't consider myself a C++ programmer, just funcitonal enough in it. It's a relatively short program.

Here's a link to read and download the paper:

https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ

My humble request/challenge is for a/some skilled Golanger(?) to translate the code into idiomatic Go to demonstrate the best way to code the algorithm in it.  Extra points if someone can do a true parallel version of the algorithm, which I attempted to do using OpemMP, but what I did didnt' seem to make the code faster than the serial version (see paper).

I assume coding this the *Go way* would look different than the C++ code, and be quite different than a direct translation into Go using the same (probably suboptimal) structure.

Ultimately, I'd like to publish the results of benchmarks in different languages doing the SSoZ in an updated paper.

If anyone would be willing to take up the challenge I'd be pleased to answer any questions the best I can.

Thanks in advance.

Jabari

Pierpaolo Bernardi

unread,
Aug 8, 2017, 6:32:15 PM8/8/17
to Jabari Zakiya, golang-nuts
Hello,

> Here's a link to read and download the paper:
>
> https://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ

Downloading the paper requires a scribd account which costs money(*).
Is the paper available for free somewhere else?

(*) Or one can use the free month they offer, but misteriously to get
a free month they require you give them your credit card number.

Cheers!

Jan Mercl

unread,
Aug 8, 2017, 6:41:06 PM8/8/17
to Pierpaolo Bernardi, Jabari Zakiya, golang-nuts
On Wed, Aug 9, 2017 at 12:32 AM Pierpaolo Bernardi <olop...@gmail.com> wrote:

> Downloading the paper requires a scribd account which costs money(*).
> Is the paper available for free somewhere else?

--

-j

Michael Jones

unread,
Aug 8, 2017, 6:46:14 PM8/8/17
to Pierpaolo Bernardi, Jabari Zakiya, golang-nuts
I remember a segmented wheel of Aitkin implementation. Maybe you can start with that.




--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Michael T. Jones
michae...@gmail.com

Lutz Horn

unread,
Aug 9, 2017, 11:02:50 AM8/9/17
to golan...@googlegroups.com
Hi Jabari,

Am 08.08.2017 22:18 schrieb Jabari Zakiya:
> Here's a link to read and download the paper:

Was your paper published in some scientific journal?

You've asked similar questions already[0]. How may replies did you get
so far? Did anybody implement your algorithm in any other language you
don't master yourself?

Besides, as having a degree in Mathematics: can you provide a proof that
a) your algorithm is correct, and b) what runtime complexity it has?

Regards

Lutz

[0] https://u.lhorn.de/ma9g
Reply all
Reply to author
Forward
0 new messages