Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 1.86 KB

README.md

File metadata and controls

69 lines (46 loc) · 1.86 KB

Primitive-Pythagorean-triplets

Copyright Adina-Maria Amzarescu 2022

Racket project for the Programming Paradigms course.

This project was done in 4 stages.


The first stage:

File: ppt.rkt

Writing simple programms. Working with lists and recursive functions on the stack.

Main functions:

  • car
  • cdr
  • list

The second stage:

File: ppt2.rkt

The main focus in on curry and uncurry functions and the abstraction of functions with similar implementations.

Using functions like:

  • map
  • apply
  • foldr / foldl

The third stage:

File: cryptosystem.rkt

At this stage it's implemented a cryptosystem with symmetric keys, in which the key generation is based on the theory of Pythagorean triplets.

Main concept: static variable binding expressions


Last stage:

File: ppt3.rkt

In the final stage the focus is on how we get an entire sequence ordered by TPP, where the order depends on the generation method used. First it is implemented the flow of triplets corresponding to the indexing we worked with in the previous stages, then another stream containing the same triplets in a different order, corresponding to a new method of generation.

Main concept: streams


Resources:

  1. Pythagorean Triples and Cryptographic Coding
  2. Data Encryption and Decryption Using New Pythagorean Triple Algorithm