nie-ii-year

lab stuff from undergrad second year.
git clone http://git.hanabi.in/repos/nie-ii-year.git
Log | Files | Refs | LICENSE

commit 32c9a8575315fa4643efa594e8d6cc5c7546f484
parent 6b1433ecbb2a247011dfb9f02e047144106cb342
Author: Agastya Chandrakant <acagastya@outlook.com>
Date:   Mon, 16 Apr 2018 20:07:44 +0530

add
Diffstat:
Ms4/fafl/report.md | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/s4/fafl/report.md b/s4/fafl/report.md @@ -4,7 +4,8 @@ ## 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 > v`. +Consider two numbers `u` and `v`. `u % v = (u - v) % v`, if `u > v` else `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}$ ### STM to check if entered natural number is prime or not