Answer set prolog program

profileh66umi6q
hw.txt

% There is a hotel that has n roomsavailable. A group of k people arrives,and each person needs to be assigned a room. % Your program must come up with different assignments of people to rooms. % Assume that all rooms are singlerooms. % Change the value of n below to test different scenarios #const n = 4. % Assume that rooms are numbered from 1 to n room(1..n). % For n = 4, this is the same as saying % room(1). % room(2). % room(3). % room(4). % Change the value of k below to test different scenarios #const k = 3. % Assume that people are numbered from 1 to k person(1..k). % For k = 3, this is the same as saying % person(1). % person(2). % person(3). % TODO: write your code here. % Make sure that each person is assigned exactly one room