Giter VIP home page Giter VIP logo

cc's Introduction

PPL Assignment {#mainpage}

Raghav Ranjan IIT2015503

  • DOCUMENTATION IS OPENED IN html/index.html
  • ALL BUILDING AND EXECUTION STATEMENTS TO BE EXECUTED IN DIRECTORY com.ppl.assignment

Generating new data (Optional)

  • The directory com.ppl.assignment contains pre-generated files for boys, girls, gifts, and value of K.
  • New data may be generated since the package contains a built-in data generating tool for creating boys, girls, and gifts.
  • Random values of k (within appropriate range) is also generated by this tool.
  • To generate the required files again, execute =
g++ randomGen.cpp
./a.out

Installation

  • Open terminal in directory com.ppl.assignment
  • Code is built using the following command:
./build.sh

Execution:

./a.out
  • This build was tested on a system running Ubuntu 16.04 LTS

Synopsis

Data is logged in "LOG.txt"

Program displays and logs

  • All the couples formed.
  • All the gifts exchanged.
  • k most compatible couples
  • k happiest couples

Last section shows the criteria used for creating couples

Reading final result

  • Details of all commitments and gifting are logged in a file called "LOG.txt" and can be read easily.
  • Details of happiest and most compatible couples are also added into the same file.

Summary of criteria and results

The software is designed to implement allocation of boyfriends to girls read from an input file.

Implementation logic is as follows:

  1. Each girl has a different criterion of choosing the boys to date, which can be either of: most attractive, most rich or most intelligent.
  2. A girl only dates guys whose budget is greater than or equal to her maintenance budget.
  3. A boy only dates girls whose attractiveness is higher than his benchmark for minimum attractiveness.

Upon successful allocation, a gifting algorithm is followed to provide gifts to all the committed girls. According to the gifts given, happiness of all the girls is adjudged.

Every gift has a price and a value. Both are known in advance as adjudged by experts. There are three types of gifts:

  • Essential Gifts: These are bare minimal gifts and are associated with a price and value.
  • Luxury Gifts: These gifts have the attributes of the luxury rating, difficulty to obtain the gift, value and price.
  • Utility Gifts: These gifts are associated with the utility value, utility class, value and price.

As legend has it, there are three types of committed girls:

  • The choosy- Whose happiness in a relationship is logarithmic of the total cost of gifts achieved over maintenance. However the luxury gifts are very previous and count double the normal value.

  • The normal- Whose happiness in a relationship is linear to the total cost of gifts achieved over maintenance, including luxury gifts. The value of all gifts is added additional to the cost.

  • The desperate Whose happiness in a relationship is exponential to the total cost of gifts received over maintenance, including luxury gifts. The value is not considered. Similarly there are three types of committed boys:

  • The Miser- Who gift their girlfriend with enough gifts, equal or just over the maintenance cost. The happiness of these boys is given by the total unspent money from their budget.

  • The Generous Who gift their girlfriend with maximum cost gifts, equal to or just under their budget. The happiness of these boys is given by the happiness of the girlfriend.

  • The Geeks Who gift their girlfriend with enough gifts, equal or just over the maintenance cost. They additionally give one luxury gift, if budget allows. The happiness of these boys is given by the intelligence of their girlfriend alone.

cc's People

Contributors

codealine avatar

Watchers

James Cloos 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.