diff --git a/README.md b/README.md
@@ -2,18 +2,30 @@
An exercise on _polyglossy_. The same problem solved on multiple languages.
# The Problem - Mathematicians Version
-Let <img src="https://latex.codecogs.com/svg.latex?S:&space;\mathbb{N}\rightarrow&space;\mathbb{N}"/> be the sum of the digits of a positive integer in a _[base 10 positional number system](https://en.wikipedia.org/wiki/Positional_notation)_. We have:
+Let
+<img src="https://latex.codecogs.com/svg.latex?S:&space;\mathbb{N}\rightarrow&space;\mathbb{N}"/>
+be the sum of the digits of a positive integer in a
+_[base 10 positional number system](https://en.wikipedia.org/wiki/Positional_notation)_.
+We have:
<img src="https://latex.codecogs.com/svg.latex?\forall&space;a,&space;b&space;\in&space;\mathbb{N},&space;S_{a&space;+&space;b}&space;\equiv&space;S_a&space;+&space;S_b&space;\;\(\textup{mod}\;&space;9&space;\)"/>
-This conjecture can be generalized for any _positional number system_. Check out `proof.pdf` for more information.
+This conjecture can be generalized for any _positional number system_.
+Check out `proof.pdf` for more information.
# The Problem - Programmers Verison
-Let `S(n: uint) -> uint` be the sum of the digits of `n` in _[base 10](https://en.wikipedia.org/wiki/Decimal)_. Then, for all `a` and `b` of type `uint`, `S(a + b) - ( S(a) + S(b) ) % 9 == 0`.
+Let `S(n: uint) -> uint` be the sum of the digits of `n` in
+_[base 10](https://en.wikipedia.org/wiki/Decimal)_. Then, for all `a` and `b`
+of type `uint`, `S(a + b) - ( S(a) + S(b) ) % 9 == 0`.
# Performance
-The conjecture was [proved by exhaustion](https://en.wikipedia.org/wiki/Proof_by_exhaustion) for the interval <img src="https://latex.codecogs.com/svg.latex?[0,&space;10^4]"/> in multiple language implementations. The performance of each language was then avaliated as the following _(*)_:
+
+The conjecture was
+[proved by exhaustion](https://en.wikipedia.org/wiki/Proof_by_exhaustion) for
+the interval <img src="https://latex.codecogs.com/svg.latex?[0,&space;10^4]"/>
+in multiple language implementations. The performance of each language was then
+avaliated as the following _(*)_:
|Language |Milliseconds|
|--------------|------------|
@@ -49,7 +61,9 @@ The following algorithm should be used:
for a between 0 and MAX:
for b between 0 and a:
check if the conjecture holds for the pair (a, b)
- if it fails, exit the process with exit code 1
+
+ if it fails:
+ exit the process with exit code 1
exit the process with exit code 0
```
@@ -70,9 +84,11 @@ addapted to the following:
for i between 0 and NPROCESSES:
lauch a process running counterexample(start=i)
-for i between 0 and NPROCESSES:
- wait for the i-th process to signal it's results
- if the process signals a counterexample was found, exit the main process with exit code 1
+for each opened process:
+ wait for the process to signal it's results
+
+ if the process signals a counterexample was found:
+ exit the main process with exit code 1
exit the main process with exit code 0
```
@@ -83,7 +99,9 @@ The algorith for the `counterexample` routine should be the following:
for a between 0 and MAX by steps of NPROCESSES:
for b between 0 and a:
check if the conjecture holds for the pair (a, b)
- if it fails, signal to the main process that a counterexample was found
+
+ if it fails:
+ signal to the main process that a counterexample was found
signal to the main process that no counterexample was found
```
@@ -92,3 +110,7 @@ This scheme ensures computations are envenlly distributed across processes.
Note that the routine should only signal wheter or not a counterexample was
found.
+### Caching
+
+TODO
+