<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://ocw.cs.pub.ro/ppcarte/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://ocw.cs.pub.ro/ppcarte/feed.php">
        <title>books fp2024</title>
        <description></description>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <image rdf:resource="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-04-28T21:31:47+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw1&amp;rev=1711041129&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw2&amp;rev=1713367931&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw3&amp;rev=1715176575&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw4&amp;rev=1715269904&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab02&amp;rev=1710492350&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab03&amp;rev=1710835047&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab04&amp;rev=1711467145&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab05&amp;rev=1712044605&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab06&amp;rev=1712919477&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab07&amp;rev=1713333726&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab08&amp;rev=1714041442&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:submission-guidelines&amp;rev=1711037164&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico">
        <title>books</title>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <url>https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw1&amp;rev=1711041129&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-21T19:12:09+03:00</dc:date>
        <title>fp2024:hw1</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw1&amp;rev=1711041129&amp;do=diff</link>
        <description>Homework 1. Sets as functions

Problem statement

Sets are unordered collections of unique elements. There are several ways to store sets. One of them relies on characteristic functions. Such functional sets are especially useful if we expect many insert/retrieve$ A \subseteq U$$ f: U \rightarrow \{0,1\}$$ f(x) = 1$$ x \in A$$ f(x) = 0$$ x \not\in A$$ U$$ \{1,2,3\}$$ e$$ s$$ e \in s$$ x$$ s$$ \{x\} \cup s$$ \{start, start+1, \ldots, stop\}$$ start \leq stop$$ b + e_0 + e_1 + \ldots e_n$$ e_i$$$ …</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw2&amp;rev=1713367931&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-17T18:32:11+03:00</dc:date>
        <title>fp2024:hw2</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw2&amp;rev=1713367931&amp;do=diff</link>
        <description>Homework 2. Sets as trees

In this homework, you will implement a binary search tree, that you will use to gather stats about words from a particular text. Generally, in a  binary search tree:

	*  each non-empty node contains exactly one value and two children
	*  all values from the</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw3&amp;rev=1715176575&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-05-08T16:56:15+03:00</dc:date>
        <title>fp2024:hw3</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw3&amp;rev=1715176575&amp;do=diff</link>
        <description>Homework 3: 5-in-a-row

In this homework, you will implement functionality which will allow you to design a completely functional 5-in-a-row game. 

About 5-in-a-row

The game:

	*  an be played on a square board of any size larger or equal to 5.
	*</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw4&amp;rev=1715269904&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-05-09T18:51:44+03:00</dc:date>
        <title>fp2024:hw4</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:hw4&amp;rev=1715269904&amp;do=diff</link>
        <description>Homework 4 - Linear regression

Introduction

In the figure below, we have plotted a dataset containing, on the X axis, the overall surface of houses (in square feet) for sale, as well as, on the Y axis, their sale price. These house prices are part of a real dataset from a certain region of the US.$ x$$ y(x)$$ y$$ y = a*x + b$$ a$$ b$$ y$$ y$$ a$$ b$$  (x_i,y_i) $$  \mid y_i - (a*x_i + b) \mid $$ a*x_i + b$$ y_i$$ a$$ b$$ y = a*x_1 + b*x_2 + c$$ x_1$$ x_2$$ a,b,c$$ x$$ x_3$$$ y = a * x_1 + b * …</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab02&amp;rev=1710492350&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-15T10:45:50+03:00</dc:date>
        <title>fp2024:lab02</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab02&amp;rev=1710492350&amp;do=diff</link>
        <description>Lab 2. Scala syntax and function definition

 Objectives: 

	*  get yourself familiar with Scala syntax basics
	*  practice writing tail-recursive functions as an alternative to imperative loops 
	*  keep your code clean and well-structured.

 Create a new Scala worksheet to write your solutions $ n$$ 1 + 2^2 + 3^2 + \ldots + (n-1)^2 + n^2$$ x$$ x_0, x_1, \ldots, x_n$$ ((x - x_0) - x_1) - \ldots x_n$$ x$$ x_0, x_1, \ldots, x_n$$ x_0 - (x_1 - (x_2 - (\ldots - (x_n - x)\ldots )$$ \sqrt{a}$$ x_0 = …</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab03&amp;rev=1710835047&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-19T09:57:27+03:00</dc:date>
        <title>fp2024:lab03</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab03&amp;rev=1710835047&amp;do=diff</link>
        <description>Lab 3. Higher-order functions

Objectives:

	*  implement and use higher-order functions. A higher-order function takes other functions as parameter or returns them
	*  implement curry and uncurry functions, and how they should be properly used (review lecture).$ a_1, a_2, \ldots, a_k$$ f(a_1)\;op\;f(a_2)\;op\;\ldots f(a_k)$$ 1 + 2^2 + 3^2 + \ldots + (n-1)^2 + n^2$$ (f(a) + f(b))(b-a)/2$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab04&amp;rev=1711467145&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-26T17:32:25+03:00</dc:date>
        <title>fp2024:lab04</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab04&amp;rev=1711467145&amp;do=diff</link>
        <description>Lab 4. Algebraic Datatype definition

Below you will find the algebraic definition of the datatype IList:


Void : IList
Cons : Int x IList -&gt; IList


This definition has already been implemented in Scala, below. Please copy-paste this definition in your worksheet.</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab05&amp;rev=1712044605&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-02T10:56:45+03:00</dc:date>
        <title>fp2024:lab05</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab05&amp;rev=1712044605&amp;do=diff</link>
        <description>Lab 4. Functional vs Object-Oriented decomposition

4.1. The type Nat

Consider the following type defined to represent natural numbers:


trait Nat {
   def isZero: Boolean
   def add(other: Nat): Nat
   def subtract(other: Nat): Nat
   def greater(other: Nat): Boolean
   def toInt: Int
}
case object Zero extends Nat
case class Succ(n: Nat) extends Nat

$ n &gt; m$$ m - n = 0$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab06&amp;rev=1712919477&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-12T13:57:57+03:00</dc:date>
        <title>fp2024:lab06</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab06&amp;rev=1712919477&amp;do=diff</link>
        <description>Lab 06. List applications

In this lab, we will use lists to implement a lot of string processing. The type String is not decomposable as a list, but strings can be converted to lists of Char as follows:


&quot;Some string&quot;.toList


For this reason, we will use the following aliases:</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab07&amp;rev=1713333726&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-17T09:02:06+03:00</dc:date>
        <title>fp2024:lab07</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab07&amp;rev=1713333726&amp;do=diff</link>
        <description>Lab 07: Polymorphism

7.1. Companion objects and Option

Consider the following implementation of the type Nat, which you are well-familiar with:


trait Nat {
   def +(other: Nat): Nat
}
case object Zero extends Nat{
   override def +(other: Nat): Nat = other
}
case class Succ(n: Nat) extends Nat{
   override def +(other: Nat): Nat = Succ(n + other)
}</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab08&amp;rev=1714041442&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-25T13:37:22+03:00</dc:date>
        <title>fp2024:lab08</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:lab08&amp;rev=1714041442&amp;do=diff</link>
        <description>Lab 08: Matrices

8.1.

In the first part of this lab, we will work with matrices of integers:


type Matrix = List[List[Int]]


You can use higher-order functions of for expressions at your leisure.

8.1.1. Write a function which computes the sum of all elements from a matrix.</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:submission-guidelines&amp;rev=1711037164&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-21T18:06:04+03:00</dc:date>
        <title>fp2024:submission-guidelines</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=fp2024:submission-guidelines&amp;rev=1711037164&amp;do=diff</link>
        <description>Submission guidelines

Project format

	*  You should not change any other files of the project, except for the template-file and the test-file. 
	*  You may change the test-file at your leisure (add tests, comment tests out), but for the grading your file will be</description>
    </item>
</rdf:RDF>
