(file name: rbac.pl)

This programming challenge was created for the Workshop on Logic and Practice of Programming (LPOP) at the Federated Logic Conference (FLOC), Oxford, UK, July 18, 2018, by Annie Liu. Web page and schedule is here: http://lpop.cs.stonybrook.edu. Complete challenge is here: LPOP challenge

Amy sets the roles and permissions for all the users that participate in a conference (i.e., chairs, authors, etc.). She considers the following sets:

After Amy decided on the above sets and assigned the roles to all the users, she realized that she defined too many roles for each user and too many permissions for every role, so she wants to find the ROLES' , UR', RP', and RH' with the smallest total size of UR', RP', and RH' such that each user has the same permissions through AuthorizedRoles as before (in RBAC this is called MinRoleAssignmentsWithHierarchy). Find this smallest total size of UR', RP', and RH'.

Input format

An input file for LP systems contains the following facts:

Output format

The output should contain exactly one fact of the form minRoleAssignmentsWithHierarchy(S), where S is the smallest total size of UR', RP', and RH'.

Acknowledgment: thanks to Annie Liu for suggesting this problem.