Coder Social home page Coder Social logo

func-log-programming-labs's Introduction

func-log-programming-labs

Lab1 "Lists" (Haskell, Prolog)

  1. Find the minimum element and the position of all its entries in the list.
  2. Calculate the statistics of the entries in the list.

Lab2 "Lists (Additional tasks)" (Haskell)

Divide a given list into several lists, writing down in the first list values less than 1!, in the second - less than 2! but not on the previous list, in the third - less than 3! but did not get to the previous two lists, the fourth is less than 4! but not in the previous lists, etc.

Lab2 "Lists (Additional tasks)" (Prolog)

Find all the "top peaks" of the list and their positions. A list item is an upper peak if it is larger than its existing neighbors. Consider that the list consists of different items. For example, in the list [5, 4, 2, 8, 3, 1, 6, 9, 5] the upper peaks and their positions are: (5,1), (8,4), (9,8).

Lab3 "Finite-state automata" (Haskell)

For given words v and w, determine if the finite state machine admits at least one word that can be represented as vywy for some word y. If yes, give an example of the corresponding word vywy.

Lab4 "Context-free grammars" (Haskell)

For each non-terminal A find:

minLengthR(A) = min{length (w) | A =>+ Aw, w is a word in the terminal alphabet}

and

wordsMinLenR(A) = {x | A =>* Ax, x is a word in the terminal alphabet, length(x) = minLengthR(A)}

Lab5 "Expert systems" (SWI-Prolog)

Develop a simple expert system with more than 8 entities, generalizing terms, and properties that have multiple alternatives.

Lab6 "Monads" (Haskell)

  1. Program and test three unary Maybe-functions to calculate the given three formulas.
  2. Using monad operations, program and test the Maybe-function to calculate the superposition of the above three functions:
    1. Submit the desired function using do-notation.
    2. (Optional). Submit the desired function without using do-notation.
  3. (Optional). Program and test the binary Maybe-function to calculate the last of the three given formulas (here n is considered a real number).
  4. (Optional). Using monad operations, program and test the Maybe-function to calculate such a superposition, when the above-mentioned binary function is replaced by the first function from point 1 instead of its first argument, and the second instead of the second argument:
    1. Submit the desired function using do-notation.
    2. Submit the desired function without using do-notation.

func-log-programming-labs's People

Contributors

vinnik-dmitry07 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.