Raghav Ranjan IIT2015503
- DOCUMENTATION IS OPENED IN html/index.html
- ALL BUILDING AND EXECUTION STATEMENTS TO BE EXECUTED IN DIRECTORY com.ppl.assignment
- 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
- Open terminal in directory com.ppl.assignment
- Code is built using the following command:
./build.sh
./a.out
- This build was tested on a system running Ubuntu 16.04 LTS
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
- 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.
The software is designed to implement allocation of boyfriends to girls read from an input file.
Implementation logic is as follows:
- Each girl has a different criterion of choosing the boys to date, which can be either of: most attractive, most rich or most intelligent.
- A girl only dates guys whose budget is greater than or equal to her maintenance budget.
- 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.