**commit** 6bda1c6ae43e82ec17a83cbdba0d90505e4fecb0
**parent** 1b464523c727c8405ebf0a0b12aba18c45ac9d8c
**Author:** Agastya Chandrakant <acagastya@outlook.com>
**Date:** Tue, 17 Apr 2018 10:34:16 +0530
add
**Diffstat:**

1 file changed, 2 insertions(+), 2 deletions(-)

**diff --git a/s4/fafl/report.md b/s4/fafl/report.md**
@@ -4,7 +4,7 @@
## Standard TM to compute modulo and division of two natural numbers as well as to check if a given natural number is prime
### STM as a transducer to compute modulo and division
-Consider two numbers `u` and `v`. `u % v = (u - v) % v`, if `u` is greater than or equal to `v` else `u`. Using this, a recursive relation can be established, which is:
+Consider two numbers `u` and `v`. `u % v` is defined as `(u - v) % v`, if `u` is greater than or equal to `v` else, it is `u`. Using this, a recursive relation can be established, which is:
$\mod(u, v) = \begin{cases} u: u < v\\mod (u - v, v): otherwise\end{cases}$
Its iterative code in JavaScript is:
@@ -28,7 +28,7 @@ function newModulo(u, v) {
return u;
}
```
-In the above code, `quo` variable gives the quotient. Noting that repeated subtraction yields remainder, and count of subtraction yields quotient, state transition diagram of a STM with infinite memory (in theory) can be drawn.
+In the above code, `quo` variable gives the quotient. Noting that repeated subtraction yields remainder, and count of subtraction yields quotient, state transition diagram of a STM with tape of infinite memory (in theory) can be drawn.
__Refer figure 1 for TM1 which acts as a transducer to find remainder and quotient of two natural numbers__