URL and format fixes in 2001/ollinger
This commit is contained in:
1 parent
04f28bad8a
commit
7126a7e508
3 files changed
+19
-22
No files matched your search
+17
-20
@@ -1,13 +1,8 @@
|
||||
# Best primal ASCII graphics
|
||||
|
||||
Nicolas Ollinger
|
||||
Ecole Normale Superieure de Lyon
|
||||
LIP, ENS Lyon
|
||||
46, allée d'Italie
|
||||
69364 Lyon Cedex 07
|
||||
France
|
||||
|
||||
http://www.ens-lyon.fr/~nollinge/
|
||||
Nicolas Ollinger
|
||||
France
|
||||
<https://www.univ-orleans.fr/lifo/Members/Nicolas.Ollinger/>
|
||||
|
||||
## To build:
|
||||
|
||||
@@ -28,7 +23,7 @@ make
|
||||
```
|
||||
|
||||
Try the above command in a large window, say 200 chars wide and 100
|
||||
high (200x100) with a tiny font,
|
||||
high (200x100) with a tiny font.
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
@@ -39,19 +34,20 @@ Do get lost in the programs line of thought! :-)
|
||||
### What's this?
|
||||
|
||||
What do you see? On the left, you will see an enumeration of all successive
|
||||
primes from 2 to the parameter you gave to the program. On the right part,
|
||||
you can see the sieve used to find these primes. The big diagonals from
|
||||
right to left are used to erase composed numbers. When no diagonal crosses
|
||||
a number, then the left cell take value 1 and the number is prime.
|
||||
[primes](https://en.wikipedia.org/wiki/Prime_number) from 2 to the parameter you
|
||||
gave to the program. On the right part, you can see the sieve used to find these
|
||||
primes. The big diagonals from right to left are used to erase composed numbers.
|
||||
When no diagonal crosses a number, then the left cell take value 1 and the
|
||||
number is prime.
|
||||
|
||||
The parallel version of this algorithm works in real time n. This C
|
||||
sequential version is slower as it works in O(n*log n). But you have some
|
||||
sequential version is slower as it works in `O(n*log n)`. But you have some
|
||||
nice picture instead... the cost is a constant number of operation for each
|
||||
character printed on the screen.
|
||||
|
||||
### Why do you wrote it?
|
||||
### Why did I write this ?
|
||||
|
||||
Let's just quote the FAQ :
|
||||
Let's just quote the [FAQ](/faq.md):
|
||||
|
||||
Q: Are there types of entries that are submitted so frequently that the
|
||||
judges get tired of them?
|
||||
@@ -95,12 +91,13 @@ some complex state machine/table to generate small primes and print them.
|
||||
### The way it works
|
||||
|
||||
This program simply prints the space-time diagram of some particular
|
||||
cellular automaton. The automaton is a 9-state automaton by Korec in 1998.
|
||||
cellular automaton. The automaton is a 9-state automaton by [Ivan
|
||||
Korec](https://sk-m-wikipedia-org.translate.goog/wiki/Ivan_Korec?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp) in 1998.
|
||||
It is an optimization of an old automaton for recognizing primes designed
|
||||
by Fischer in 1965.
|
||||
by [Fischer](http://richardallenfischer.com) in 1965.
|
||||
|
||||
The table of the automaton is encoded into the string e and consists of
|
||||
345 transitions of the kind f(left,middle,right). This encoding into e
|
||||
The table of the automaton is encoded into the string `e` and consists of
|
||||
345 transitions of the kind ff(left,middle,right)`. This encoding into `e`
|
||||
is obfuscated to reduce its size, restrict it to characters 32 to 127 and
|
||||
guarantee a constant time.
|
||||
|
||||
|
||||
Reference in new issue
Block a user