This project contains cpigjs, a program written in JavaScript
to draw Conditional Predicate Implication Graphs.
The primary application of cpigjs is visualizing implications among fairness notions
for the problem of fairly allocating indivisible items.
The fairDiv directory contains data on implications, which cpigjs can use to
infer additional implications and draw them as a DAG.
There is a set bool).
We say that a predicate
Given a set of conditional implications,
cpigjs infers more of them using transitive closure
and then displays them as a Hasse diagram.
This is useful to visualize, e.g., implications between fairness notions in the fair division problem. Here the ground set is the set of all allocations across all fair division instances, and the predicates are fairness notions. Implications are often conditional on, e.g., valuation functions being additive, or the items being goods.
The ground set is generally uncountably large (e.g., in fair division),
so we cannot explicitly enumerate its members.
Instead, we implicitly define a set family
For the problem of fairly allocating indivisible items,
fairDiv/setFamily.json describes the family fairDiv/data.json describes the predicates and implications.
- Install the project's dependencies (
npm install). - Install typescript (
npm install -g typescript). - Run
npx tscto compile the typescript code incpigjs.
Install Graphviz and ensure that the
dot command is available on your command line.
To return all implications for additive valuations over goods when agents have equal entitlements
(including open problems), and save the output to goods.pdf, run
node scripts/cli.js --sf fairDiv/setFamily.json -i fairDiv/data.json -c '{"valuation": "additive", "marginal": "nonneg", "eqEnt": true}' -o goods.pdf
To output the sequence of implications from EEF (epistemic envy freeness) to MMS (maximin share) for additive valuations, run
node scripts/cli.js --sf fairDiv/setFamily.json -i fairDiv/data.json -c '{"valuation": "additive"}' --pred EEF MMS
To run unit tests, run npx mocha scripts/test.js.
First, generate an HTML file by running npm run buildWeb.
Then serve this project's root directory (i.e., fairDiv's parent directory) using an HTTP server,
and open fairDiv/index.html in your web browser.