Solutions to interesting algorithmic problems following functional and logical programming paradigm ðŸ§
Most of the code we are used to see and is deployed in everyday application, is written in languages following the Imperative Programming Paradigm. This type of software uses a sequence of statements that affect the state of the program. Programmers are called to describe how a program should operate step by step. This is not the only way of deploying code, as there are other two interesting programming paradigms:
-
Functional Programming - programs are constructed by applying and composing functions. Here, function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program. It can be regarded as a subcategory of Imperative Programming, but due to its peculiarity, we present it as a seperate category.
-
Logical Programming - is largely based on formal logic. Programs following this paradigms are a set of sentences in logical form, expressing facts and rules about some problem domain. In this type of languages, rules are written in the form of clauses. Programmers are called to formulate high-level descriptions of the expected results.
In this project we use Haskell and Prolog for development in the functional and logical paradigm respectively.
Problems included in this project have a variety of possible solutions. We were required to submit the optimal ones and I managed to follow these instructions. It is important to point out that some of those questions are problems from actual national and international math competitions disguised as story driven puzzles.
New problems are posed every year as assignments of the Principles Of Programming Languages course. You can find those problem formulation, here.
Built as part of the course: Principles Of Programming Languages, Winter of 2018. University of Athens, DiT.