Giter Club home page Giter Club logo

cs-f214-logic-in-computer-science-assignment's Introduction

CS F214 Logic in Computer Science Assignment

Authors:

Rahul Bothra 2016A7PS0015P
Sankalp Sangle 2016A7PS0110P

Problem Statement:

  1. To check whether a given binary relation is transitive over a given set.
  2. To compute the transitive closure of a binary relation over a given set.

Additional details are given in Question.pdf

Predicates' Description:

Note:

  1. A, B are Lists.
  2. C is a element.
  3. S is a list of elements in the Set. (Input format: List of elements)
  4. R is the binary relation on the set S. (Input Format: List of 2-element lists)
  5. X is used to compute and return a value.

member(C,A): Builtin to check whether C is a member of A.
appendList(A,B,X): Appends A to B and returns them as X.
validRelation(S,R): Checks whether all elements in R belong to S.
transitiveCheck(R): Checks whether R is transitive.
transitive(S,R): Checks whether R is valid over S and is transitive.
closureCheck(R,X): Computes the transitive closure of the R and returns it as X.
closure(S,R): Checks whether R is valid over S and prints transitive closure of R.

Usage:

  1. Load the file answer.pl
swipl answer.pl
  1. To check if a Relation R is transitive over a set S, type
transitive(S, R).
  1. To compute transitive closure of a Relation R, type
closure(S,R).
  1. To check whether a Relation R' is the transitive closure of Relation R, type
closureCheck(R,R').

cs-f214-logic-in-computer-science-assignment's People

Contributors

rhl-bthr avatar sankalp-sangle avatar

Watchers

 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.