IMA Preprint Series # 2133-6 › sites › default › files › 2133-6.pdfRyan Nong, Xinyi Zhang...

32
ALGORITHMS FOR THE CARPOOL PROBLEM By Jo˜ ao Pedro Boavida, Vikram Kamat, Darshana Nakum, Ryan Nong, Xinyi Zhang and Chai Wah Wu (mentor) IMA Preprint Series # 2133-6 ( September 2006 ) INSTITUTE FOR MATHEMATICS AND ITS APPLICATIONS UNIVERSITY OF MINNESOTA 400 Lind Hall 207 Church Street S.E. Minneapolis, Minnesota 55455–0436 Phone: 612/624-6066 Fax: 612/626-7370 URL: http://www.ima.umn.edu

Transcript of IMA Preprint Series # 2133-6 › sites › default › files › 2133-6.pdfRyan Nong, Xinyi Zhang...

ALGORITHMS FOR THE CARPOOL PROBLEM

By

Joao Pedro Boavida, Vikram Kamat, Darshana Nakum,

Ryan Nong, Xinyi Zhang

and

Chai Wah Wu (mentor)

IMA Preprint Series # 2133-6

( September 2006 )

INSTITUTE FOR MATHEMATICS AND ITS APPLICATIONS

UNIVERSITY OF MINNESOTA

400 Lind Hall207 Church Street S.E.

Minneapolis, Minnesota 55455–0436Phone: 612/624-6066 Fax: 612/626-7370

URL: http://www.ima.umn.edu

Algorithms for the Carpool Problem

Joao Pedro Boavida∗† Vikram Kamat‡ Darshana Nakum§ Ryan Nong¶

Chai Wah Wu (mentor)‖ Xinyi Zhang∗∗

August 18, 2006

Abstract

We investigate the carpool problem, on choosing a driver from a subset of a set of peoplewho are members of a carpool. Coppersmith el al. [4] examine the bounds on the values thatcharacterize the fairness of carpool algorithms. In this report, we study the methods introducedin that paper and suggest computational techniques for further improving the lower bound.Specifically, we introduce an algorithm to search the tree ofevolution of a given error vector.With this algorithm, we eliminate more possibilities of error vectors from consideration for ahigher lower bound.

1 Introduction and Problem Formulation

The carpool problem can be defined as follows: A certain set ofn people decide to carpool towork. Each day a certain subset of these people arrive. They need to formulate an algorithm todecide on who drives for the day.

The important thing to consider here is the choice of driver which should be as fair as possible.This means that over a long period of time, it should not be that a single driver (or a certain subset ofdrivers) has driven considerably more times than the rest. The algorithm should also be reasonablyrobust, meaning that on any given day if a person who is not supposed to drive drives or vice versa,the algorithm should be able to recover from such exceptional cases and still be able to make fairchoices at a later stage.

The carpool problem was first proposed and studied by Fagin and Williams [1] and later studiedby Ajtai et al. [2]. The papers, for the most part, deal with online schemes, i.e., when the schedule

∗School of Mathematics, University of Minnesota, Twin Cities.†Departamento de Matematica, Instituto Superior Tecnico, Lisboa, Portugal.‡Department of Mathematics and Statistics, Arizona State University.§Department of Mathematical Sciences, University of Nevada.¶Computational and Applied Mathematics Department, Rice University.‖TJ Watson Research Center, IBM.

∗∗Department of Mathematics, University of Delaware.

1

of future arrivals of participants is not known. Fagin and Williams [1] discuss a few elementaryschemes for choosing a driver each day, highlights their flaws in terms of fairness and/or robustnessand then propose a scheduling algorithm which is fair (in thesense considered in the paper whichalso is the one we discuss now).

To define the fairness of an algorithm, we consider the ideal number of drives a participantmakes. Ideally, if personi shows upbk of the days when a total ofk participants show up, thenishould drivebk/k of those days. That is, the ideal number of times that personi drives is

∑k bk/k.

(Naor [3] gives an axiomatic characterization of the concept of “fair share”, as described in [1].)We say that an algorithm isfair if the highest (across all participants) deviation betweenthe idealand actual number of drives is bounded over time, independently of the schedule of arrivals.

We introduce the vectorx = (xi) of these errors.If s is the set of arrivals on a given day, andi is the driver, the new error vector will bex′ =

x + δ(s, i), whereδ(s, i) = −ei + 1|s|

∑j∈s ej and|s| is the number of arrivals.

In these terms, an algorithm isfair if there is a boundB such thatmaxi,t |xi(t)| ≤ B indepen-dently of the schedule of arrivals.

Finding an algorithm requiring a lowest boundB has at least two benefits. Firstly, when weactually want to model fairness, the lowest values ofB will guarantee the smallest deviations fromthe “ideal shares”. Secondly, for automated schedule generation we certainly have an interest inreducing the range of possible values of whatever variableswe need to keep track of.

Clearly,x ∈ 1LZ

n, whereL = lcm(1, 2, . . . , n). Moreover,∑

ixi = 0, so the possible error

vectors lie on a hyperplane. Figure1 shows what happens withn = 3 and a boundB = 5.One way to assure fairness is to, if the current state is described by the error vectorx, choose

the driver that makes the new error vectorx′ closest to the origin. In other words, the driver willbe whomever has the highest scorexi (i.e., whomever has gotten the more free rides so far). Thisis known as the greedy algorithm.

Coppersmith et al. [4] discuss the generalized carpool problem and prove that thegreedy al-gorithm (for the generalized problem) is the optimal strategy, in the sense that its boundB is thelowest. It is also known that the bound for the greedy algorithm satisfiesB < n−1

2, and thatn−1

2is

the lowest bound possible for B ofany algorithm. For the carpool problem, Coppersmith et al. [4]show thatany algorithm satisfiesB ≥ 3

8(n − 1) − 1

4. The goal of our project is to close the gap

between these two bounds.

2 Algorithm

One way to find a boundB is to look at error vectorsx with some special property (which makethem easy to determine). Following Coppersmith et al. [4], we consider points with maximumsecond moment||x||2 =

∑i x

2i .

Another look at Figure1 will explain why this is a reasonable approach: If the algorithm isfair, then only finitely many error vectors can be reached, and certainly some of them will havemaximum moment. These error vectors will be those closest tothe boundary, and so they will giveus a good lower bound.

2

Figure 1: The state space forn = 3. A bounding box withB = 5 is shown. Only points withx1 − x2 = x2 − x3 = 0 mod 3 are reachable, and only those are shown.

Coppersmith et al [4] report certain patterns that cannot occur in a statex of maximum moment.We had some moderate success in finding more non-occuring patterns.

Suppose we are given an initial error vectorx. Had it maximum moment, no algorithm, nomatter what the schedule of arrivals be, would produce a new error vectorx′ with higher moment.

Because we cannot specify algorithms in their entirety, we conceive of this determination asa game: one player (∃) chooses who the arrivals are, while the other player (∀, who could be anactual algorithm, as well as a random procedure) chooses thedriver. If an error vector of highermoment is reached, player∃ wins. If an error vector is reached for a second time, then player ∀wins. Sooner or later, one of the players must win (note that there are finitely many error vectorswith moment bounded by||x||2).

The question now becomes: Does any of the players have a winning strategy? If∃ does, thena judicious choice of the schedule of arrivals can forceany algorithm to push the error vector to amoment higher thanx. If instead∀ has a winning strategy, it means that there is an algorithm thatcan prevent the moment from increasing further.

Let’s summarize this procedure. We consider the following functions:

• TestPt(x) determines whether there is a strategy to push fromx to a vector of higher mo-

3

ment;

• TestMoment(x, m) determines whether there is a strategy to push fromx to a vector withmoment higher thanm;

• TestSet(x, m, s) determines whether there is a strategy to push fromx to a vector withmoment higher thanm, with s being∃’s first move;

• TestDriver(x, m, s, i) determines whether there is a strategy to push fromx to a vector withmoment higher thanm, with s being∃’s first move, andi ∈ s being∀’s counter-move.

Then the procedure can be summarized as follows:

TestPt(x) ≡ TestMoment(x, ||x||2).TestMoment(x, m) ≡

s set of arrivals

TestSet(x, m, s).

TestSet(x, m, s) ≡∧

i∈s

TestDriver(x, m, s, i).

TestDriver(x, m, s, i) ≡ x′ ← x + δ(s, i);

if x′ was visited beforereturn false;

if ||x||2 > m return true;

if iteration depth was reachedreturn false;

return TestMoment(x′, m).

For a more detailed algorithm, see Appendix A.As the search tree grows exponentially, the following considerations should be kept in mind

while implementing the algorithm, in order to reduce the computer’s running time. First, spe-cial data structures should be employed to avoid repetitions while searching through all subsetsof arrivals. One specific consideration is to formulate an algorithm to keep track of all visitedconfigurations. Then the search down the tree can be stopped once no more new configurationsare encountered. In this case, then one in fact shows that theconsidered error vector cannot beexcluded (see the next section for more on this issue). Second, subsets of arrivals may be chosenin a random or well-organized fashion to increase the likelihood of meeting the ultimate subset ofarrivals early in the search.

3 Results and Observations

On trying to close the gap between the upper bound for the greedy algorithm n−12− 1

Land the

lower bound for any algorithm3(n−1)8− 1

4, one needs to eliminate as many cases of error vectors

as possible. In order to test if an error vector can be excluded, one needs to “search” the tree ofevolution of the error vector. As conveyed in the problem statement, we need to find (a tree of)subsets of arrivalss guaranteeing that, whatever the choices of drivers, the second moment willeventually get higher than in the initial configuration. Thealgorithm presented does exactly this.

4

Said algorithm has been implemented in a few different languages such as Maple, Mathematicaand Matlab. One of the Matlab versions implements the detailed algorithm presented in AppendixA and returns whether or not the input error vector can be excluded at a specified search depth. Ifthe input error vector can be excluded at the search depth, italso returns one possible evolutionof the error vector. The Maple version uses the greedy algorithm to answer the same question.This is done for quick checks since if an error vector cannot be excluded by using the greedyalgorithm then it cannot for any other algorithm. The Mathematica version is capable of eliminat-ing repetitions and also has an option to pick random subsetsof arrivals. It also returns a tree ofevolution.

During the course of the workshop, using these implementations, we were able to exclude anumber of error vectors. The following table contains thesecases in terms of lists of gaps (Note:Some of these lists of gaps have already been reported in Coppersmith et al. [4]). See Appendix Bfor more details of the schedules of arrivals.

( 012

) ( 112

) ( 212

) ( 312

)( 4

12) ( 5

12) ( 6

12, 6

12) ( 6

12, 7

12)

( 612

, 812

) ( 612

, 912

) ( 612

, 1012

) ( 612

, 1112

)( 7

12, 6

12) ( 7

12, 7

12) ( 7

12, 8

12) ( 7

12, 9

12)

( 812

, 612

) ( 812

, 712

) ( 912

, 612

) ( 912

, 712

)(10

12, 6

12) (11

12, 6

12) ( 6

12, 12

12, 6

12) ( 6

12, 12

12, 7

12)

( 612

, 1212

, 812

) ( 612

, 1212

, 912

) ( 712

, 1012

, 712

) ( 712

, 1012

, 812

)( 7

12, 11

12, 7

12) ( 7

12, 11

12, 8

12) ( 7

12, 12

12, 6

12) ( 8

12, 8

12, 8

12)

( 812

, 812

, 912

) ( 812

, 912

, 812

) ( 912

, 812

, 812

)

The goal here would be to be able to exclude all sequences of gaps averaging less than a certainconstantα. This way, any (ordered) error vector(xi) would have gapsxi+1 − xi ≥ α, and soxn − x1 ≥ α(n− 1), andmaxi |xi| ≥ α

2(n− 1) (this is a rough approximation). As Coppersmith

et al. [4] show that the choiceα ≥ 34

is possible, we tried to exclude gaps that would allow us toraise that value.

The following are a few observations which we have made but did not implement or provein our algorithm. First, it is possible to show if a given error vector cannot be excluded. As weconsider only fair algorithms, the error is bounded. Thus, the corresponding number of possibleconfigurations of an error vector is finite. If one exhausts all the possible configurations but cannotfind a schedule which results in higher second moment, then the given error vector cannot beexcluded. Second, at a given stage, the greedy algorithm is the most optimal in that it alwaysreturns the lowest moment amongst those of the set of all possible algorithms. Third, we onlyconsider the cases with up to and including4 arrivals. In this scenario, in order to close the gapbetween the upper bound and the lower bound mentioned earlier in the problem statement, weshould be able to exclude the following lists of gaps( 7

12, 11

12, 9

12), ( 8

12, 10

12, 9

12), ( 9

12, 9

12, 9

12). As to

this point of writing this report, our routines have not beenable to determine if these cases areexcludable.

5

4 Future Work

There are a few directions for future exploration. One can first keep trying to see if the mentionedlists of gaps( 7

12, 11

12, 9

12), ( 8

12, 10

12, 9

12), ( 9

12, 9

12, 9

12) can in fact be excluded. If it is the case, then the

lower bound for the carpool problem using any possible algorithm can be increased; thus, the gapbetween the two bounds is smaller. If it is not the case, then one should consider more possiblesubsets of arrivals. Unless one proves the conjecture analytically, considerations of more possiblesubsets of arrivals is indispensable in trying to increase the lower bound. During our course ofwork, we only considered the cases of up to and including4 arrivals. As the number of arrivalsincreases, the search tree grows larger and wider. Therefore, coding considerations should be takeninto account in order to speed up the computer’s running time.

Acknowledgement: We would like to thank the IMA and the organizers for this wonderful oppor-tunity and the hospitality. We would like to thank our mentor, Dr. Wu, for presenting to us a veryinteresting and challenging problem and guiding us throughthe problem solving process.

References

[1] R.Fagin and J.H.Williams,A fair carpool scheduling algorithm, IBM Journal of Researchand development27(2) (1983), 133–139.

[2] M.Ajtai, J.Aspnes, M.Naor, Y.Rabani, L.J.Schulman andO.Waarts,Fairness in Scheduling,Journal of Algorithms29(2) (1998), 306–357.

[3] Moni Naor,On fairness in the carpool problem, Journal of Algorithms55(1) (2005), 93–98.

[4] Don Coppersmith, Tomasz J.Nowicki, Guiseppe A.Paleologo, Charles Tresser, Chai WahWu, The Optimality of the On-line greedy algorithm in carpool and chairman assignmentproblems , IBM Research Report, (2005)

A Algorithm

A.1 Algorithms

The following algorithm determines whether or not a given error vector can be excluded from con-sideration for a higher lower bound in the carpool problem.

Definitions: d - search depth;E = (Ei) - error vector;flag - excludability of E; i - desig-nated driver;k - number of arrivals;kmax - maximum number of arrivals;kmin - minimum numberof arrivals; l - search level;M - second moment of a givenE; Mn - updated second moment ofE; Mo - initial second moment ofE; n - number of participants;S - set of subsetss of k arrivals,wherek ∈ Z

+ andk ≤ n

6

ALGORITHM 1. Determine the Excludability of an Error Vector of a Set ofn ParticipantsInputs: E, d, kmin, kmax

Output : flagAlgorithm :1. ComputeMo (SeeALGORITHM 1a )2. Setl = 13. Whiles ∈ S4. Incrementl5. Setflag = 16. If kmin ≤ k ≤ kmax

7. Fori = 1, 2, ..., k8. UpdateE (SeeALGORITHM 1b )9. ComputeMn

10. If Mn ≤Mo

11. Setflag = 012. If l ≤ d13. Go to 3.14. Else15. Break out of For16. EndIf17. EndIf18. If flag = 019. Break out of For20. EndIf21. EndFor22. Else23. Setflag = 024. EndIf25. If flag = 126. Break out of While27. EndIf28. End While

ALGORITHM 1a. Compute the Second Moment of an Error VectorInput : EOutput : MAlgorithm :1. ComputeM =

∑i E

2i

ALGORITHM 1b. Update an Error VectorInputs: E, i, k, kmin, kmax

7

Output : EAlgorithm :1. Computem = lcm(kmin, kmax)2. Computeinc = (k − 1) ∗m/k3. Computedec = m/k4. Subtractinc from driveri5. Adddec from k − 1 passengers

A.2 Example

In the following example, we would like to check whether the error vectorE = (0, 36, 7

6) can be

excluded from consideration for a higher lower bound. In this example,n = 3, Mo = 58, kmin = 2,kmax = 3, S = {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}. For simplicity, let us writeEasE = (0, 3, 7). One can check that∀s ∈ {{}, {1}, {2}, {3}}, M would not change. Otherwise,the evolution is as follows:

l s i E Mn > Mo

1 (0, 3, 7)2 {1, 2} 1 (−3, 6, 7) 94 > 58

2 (3, 0, 7) 58 ×{1, 3} 1 (−3, 3, 10) 118 > 58

3 (3, 3, 4) 34 < 58 ×{2, 3} 2 (0, 0, 10) 100 > 58

3 (0, 6, 4) 52 < 58 ×{1, 2, 3} 1 (−4, 5, 9) 122 > 58

2 (2,−1, 9) 86 > 58√

3 (2, 5, 3) 38 < 58 ×

At this level (l = 2), one can pick anys and continue the search procedure for updatedE withMn ≤Mo. For instance, we picks = {1, 2, 3} and continue with updatedE = (2, 5, 3) as follows:

l s i E Mn > Mo

2 (2, 5, 3) 38 < 58 ×3 {1, 3} 1 (−1, 5, 6) 62 > 58

3 (5, 5, 0) 50 < 58 ×...3 (5, 5, 0) 50 < 58 ×4 {1, 2} 1 (2, 8, 0) 68 > 58

2 (8, 2, 0) 68 > 58√

8

Then one can conclude that the error vectorE = (0, 36, 7

6) can be excluded from consideration for a

higher lower bound due to the following sequence of evolution: (0, 3, 7)→ (2, 5, 3)→ (5, 5, 0)→(2, 8, 0), which results in an increase in second moment.

B Schedules of Arrivals

In this appendix we show∃’s winning strategy to exclude several sequences of gaps. Each nodeshows an error vector. For each state,∃ chooses the arrivals. Each choice of driver leads to a newerror state. All the leaves have higher moment than the original state, proving that∃ does have awinning strategy.

{0, 0}

{-6, 6}

1

{6, -6}

2

{0, 1}

{-6, 7}

1

{6, -5}

2

{0, 2}

{-6, 8}

1

{6, -4}

2

{0, 3}

{-6, 9}

1

{6, -3}

2

{0, 4}

{-6, 10}

1

{6, -2}

2

{0, 5}

{-6, 11}

1

{6, -1}

2

9

{0, 6, 12}

{-6, 6, 18}

1

{6, 6, 6}

3

{-2, 10, 10}

1

{10, -2, 10}

2

{10, 10, -2}

3

{0, 6, 13}

{0, 0, 19}

2

{0, 12, 7}

3

{-8, 16, 11}

1

{4, 4, 11}

2

{4, 16, -1}

3

{-2, 10, 11}

1

{10, -2, 11}

2

{0, 6, 14}

{0, 0, 20}

2

{0, 12, 8}

3

{-8, 16, 12}

1

{4, 4, 12}

2

{4, 16, 0}

3

{-2, 10, 12}

1

{10, -2, 12}

2

{0, 6, 15}

{0, 0, 21}

2

{0, 12, 9}

3

{-8, 16, 13}

1

{4, 4, 13}

2

{4, 16, 1}

3

{-2, 10, 13}

1

{10, -2, 13}

2

10

{0, 6, 16}

{0, 0, 22}

2

{0, 12, 10}

3

{-8, 16, 14}

1

{4, 4, 14}

2

{4, 16, 2}

3

{-2, 10, 14}

1

{10, -2, 14}

2

{-2, 16, 8}

1

{10, 16, -4}

3

{0, 6, 17}

{0, 0, 23}

2

{0, 12, 11}

3

{-8, 16, 15}

1

{4, 4, 15}

2

{4, 16, 3}

3

{-2, 10, 15}

1

{10, -2, 15}

2

{-2, 16, 9}

1

{10, 16, -3}

3

11

{0, 7, 13}

{-6, 7, 19}

1

{6, 7, 7}

3

{-2, 11, 11}

1

{10, -1, 11}

2

{10, 11, -1}

3

{0, 7, 14}

{-6, 7, 20}

1

{6, 7, 8}

3

{-2, 11, 12}

1

{10, -1, 12}

2

{10, 11, 0}

3

{4, -1, 18}

1

{16, -1, 6}

3

{4, 17, 0}

1

{16, 5, 0}

2

12

{0, 7, 15}

{-6, 7, 21}

1

{6, 7, 9}

3

{-2, 11, 13}

1

{10, -1, 13}

2

{10, 11, 1}

3

{4, -1, 19}

1

{16, -1, 7}

3

{4, 17, 1}

1

{16, 5, 1}

2

{0, 7, 16}

{0, 1, 22}

2

{0, 13, 10}

3

{-8, 17, 14}

1

{4, 5, 14}

2

{4, 17, 2}

3

{-2, 11, 14}

1

{10, -1, 14}

2

{4, -1, 20}

1

{16, -1, 8}

3

13

{0, 8, 14}

{-6, 8, 20}

1

{6, 8, 8}

3

{-2, 12, 12}

1

{10, 0, 12}

2

{10, 12, 0}

3

{4, 0, 18}

1

{16, 0, 6}

3

{4, 18, 0}

1

{16, 6, 0}

2

{0, 8, 15}

{-6, 8, 21}

1

{6, 8, 9}

3

{-2, 12, 13}

1

{10, 0, 13}

2

{10, 12, 1}

3

{4, 0, 19}

1

{16, 0, 7}

3

{4, 18, 1}

1

{16, 6, 1}

2

14

{0, 9, 15}

{-6, 9, 21}

1

{6, 9, 9}

3

{-2, 13, 13}

1

{10, 1, 13}

2

{10, 13, 1}

3

{2, 5, 17}

1

{14, -7, 17}

2

{14, 5, 5}

3

{14, -1, 11}

2

{14, 11, -1}

3

2

{2, 17, 5}

1

{14, 17, -7}

3

15

{0, 9, 16}

{-6, 9, 22}

1

{6, 9, 10}

3

{-2, 13, 14}

1

{10, 1, 14}

2

{10, 13, 2}

3

{2, 5, 18}

1

{14, -7, 18}

2

{14, 5, 6}

3

{14, -1, 12}

2

{14, 11, 0}

3

{8, 17, 0}

1

{20, 5, 0}

2

2

{2, 17, 6}

1

{14, 17, -6}

3

3 {-4, 17, 12}

1

16

{0, 10, 16}

{-6, 16, 16}

1

{6, 4, 16}

2

{-2, 8, 20}

1

{10, -4, 20}

2

{10, 8, 8}

3

{2, 12, 12}

1

{14, 0, 12}

2

{14, 12, 0}

3

{2, 6, 18}

2

{2, 18, 6}

3

{8, 0, 18}

1

{20, 0, 6}

3

{8, 18, 0}

1

{20, 6, 0}

2

17

{0, 11, 17}

{-6, 17, 17}

1

{6, 5, 17}

2

{-2, 9, 21}

1

{10, -3, 21}

2

{10, 9, 9}

3

{2, 13, 13}

1

{14, 1, 13}

2

{14, 13, 1}

3

{2, 7, 19}

2

{2, 19, 7}

3

{8, 1, 19}

1

{20, 1, 7}

3

{8, 19, 1}

1

{20, 7, 1}

2

18

{0, 6, 18, 24}

{0, 0, 24, 24}

2

{0, 12, 12, 24}

3

{-8, 16, 16, 24}

1

{4, 4, 16, 24}

2

{4, 16, 4, 24}

3

{4, 4, 10, 30}

3

{4, 4, 22, 18}

4

{-2, 10, 22, 18}

1

{10, -2, 22, 18}

2

{-2, 2, 26, 22}

2

{-2, 14, 14, 22}

3

{-2, 14, 26, 10}

4

{-2, 8, 20, 22}

2

{-2, 20, 8, 22}

3

{2, -2, 26, 22}

1

{14, -2, 14, 22}

3

{14, -2, 26, 10}

4

{8, -2, 20, 22}

1

{20, -2, 8, 22}

3

{4, 10, 4, 30}

2

{4, 22, 4, 18}

4

{-2, 22, 10, 18}

1

{10, 22, -2, 18}

3

2

{-2, 26, 2, 22}

3

{-2, 26, 14, 10}

4

{2, 26, -2, 22}

1

{14, 14, -2, 22}

2

{14, 26, -2, 10}

4

{8, 20, -2, 22}

1

{20, 8, -2, 22}

2

19

{0, 6, 18, 25}

{0, 0, 24, 25}

2

{0, 12, 12, 25}

3

{-8, 16, 16, 25}

1

{4, 4, 16, 25}

2

{4, 16, 4, 25}

3

{4, 4, 10, 31}

3

{4, 4, 22, 19}

4

{-2, 10, 22, 19}

1

{10, -2, 22, 19}

2

{-2, 2, 26, 23}

2

{-2, 14, 14, 23}

3

{-2, 14, 26, 11}

4

{-2, 8, 20, 23}

2

{-2, 20, 8, 23}

3

{2, -2, 26, 23}

1

{14, -2, 14, 23}

3

{14, -2, 26, 11}

4

{8, -2, 20, 23}

1

{20, -2, 8, 23}

3

{4, 10, 4, 31}

2

{4, 22, 4, 19}

4

{-2, 22, 10, 19}

1

{10, 22, -2, 19}

3

2

{-2, 26, 2, 23}

3

{-2, 26, 14, 11}

4

{2, 26, -2, 23}

1

{14, 14, -2, 23}

2

{14, 26, -2, 11}

4

{8, 20, -2, 23}

1

{20, 8, -2, 23}

2

20

{0, 6, 18, 26}

{0, 0, 24, 26}

2

{0, 12, 12, 26}

3

{-8, 16, 16, 26}

1

{4, 4, 16, 26}

2

{4, 16, 4, 26}

3

{4, 4, 10, 32}

3

{4, 4, 22, 20}

4

{-2, 10, 22, 20}

1

{10, -2, 22, 20}

2

{-2, 2, 26, 24}

2

{-2, 14, 14, 24}

3

{-2, 14, 26, 12}

4

{-2, 8, 20, 24}

2

{-2, 20, 8, 24}

3

{-2, 8, 26, 18}

2

{-2, 20, 26, 6}

4

{2, -2, 26, 24}

1

{14, -2, 14, 24}

3

{14, -2, 26, 12}

4

{8, -2, 20, 24}

1

{20, -2, 8, 24}

3

{8, -2, 26, 18}

1

{20, -2, 26, 6}

4

{4, 10, 4, 32}

2

{4, 22, 4, 20}

4

{-2, 22, 10, 20}

1

{10, 22, -2, 20}

3

2

{-2, 26, 2, 24}

3

{-2, 26, 14, 12}

4

{-2, 26, 8, 18}

3

{-2, 26, 20, 6}

4

{2, 26, -2, 24}

1

{14, 14, -2, 24}

2

{14, 26, -2, 12}

4

{8, 20, -2, 24}

1

{20, 8, -2, 24}

2

{8, 26, -2, 18}

1

{20, 26, -2, 6}

4

21

{0, 6, 18, 27}

{0, 0, 24, 27}

2

{0, 12, 12, 27}

3

{-8, 16, 16, 27}

1

{4, 4, 16, 27}

2

{4, 16, 4, 27}

3

{4, 4, 10, 33}

3

{4, 4, 22, 21}

4

{-2, 10, 22, 21}

1

{10, -2, 22, 21}

2

{-2, 2, 26, 25}

2

{-2, 14, 14, 25}

3

{-2, 14, 26, 13}

4

{-2, 8, 20, 25}

2

{-2, 20, 8, 25}

3

{-2, 8, 26, 19}

2

{-2, 20, 26, 7}

4

{2, -2, 26, 25}

1

{14, -2, 14, 25}

3

{14, -2, 26, 13}

4

{8, -2, 20, 25}

1

{20, -2, 8, 25}

3

{8, -2, 26, 19}

1

{20, -2, 26, 7}

4

{4, 10, 4, 33}

2

{4, 22, 4, 21}

4

{-2, 22, 10, 21}

1

{10, 22, -2, 21}

3

2

{-2, 26, 2, 25}

3

{-2, 26, 14, 13}

4

{-2, 26, 8, 19}

3

{-2, 26, 20, 7}

4

{2, 26, -2, 25}

1

{14, 14, -2, 25}

2

{14, 26, -2, 13}

4

{8, 20, -2, 25}

1

{20, 8, -2, 25}

2

{8, 26, -2, 19}

1

{20, 26, -2, 7}

4

22

{0, 7, 17, 24}

{0, 1, 23, 24}

2

{0, 13, 11, 24}

3

{-8, 17, 15, 24}

1

{4, 5, 15, 24}

2

{4, 17, 3, 24}

3

{-2, 11, 15, 24}

1

{10, -1, 15, 24}

2

{4, -1, 15, 30}

1

{16, -1, 15, 18}

4

{8, -1, 19, 22}

1

{20, -1, 7, 22}

3

{20, -1, 19, 10}

4

{8, -1, 13, 28}

3

{8, -1, 25, 16}

4

{14, -1, 25, 10}

1

{26, -1, 13, 10}

3

{4, 11, 3, 30}

2

{4, 23, 3, 18}

4

{-2, 23, 9, 18}

1

{10, 23, -3, 18}

3

23

{0, 7, 17, 25}

{0, 7, 11, 31}

3

{0, 7, 23, 19}

4

{0, 1, 23, 25}

2

{0, 13, 23, 13}

4

{-8, 17, 23, 17}

1

{4, 5, 23, 17}

2

{4, 17, 23, 5}

4

{-2, 11, 23, 17}

1

{10, -1, 23, 17}

2

{-2, 5, 29, 17}

2

{-2, 17, 17, 17}

3

{-2, 9, 21, 21}

2

{-2, 21, 9, 21}

3

{-2, 21, 21, 9}

4

{4, -1, 29, 17}

1

{16, -1, 17, 17}

3

{8, -1, 21, 21}

1

{20, -1, 9, 21}

3

{20, -1, 21, 9}

4

{8, -1, 15, 27}

3

{8, -1, 27, 15}

4

{14, -1, 9, 27}

1

{26, -1, 9, 15}

4

{14, -1, 27, 9}

1

{26, -1, 15, 9}

3

{-2, 17, 23, 11}

1

{10, 17, 23, -1}

4

3

{-2, 17, 29, 5}

4

{4, 17, 29, -1}

1

{16, 17, 17, -1}

3

{8, 21, 21, -1}

1

{20, 9, 21, -1}

2

{20, 21, 9, -1}

3

{8, 15, 27, -1}

2

{8, 27, 15, -1}

3

{14, 9, 27, -1}

1

{26, 9, 15, -1}

3

{14, 27, 9, -1}

1

{26, 15, 9, -1}

2

24

{0, 7, 18, 25}

{0, 7, 12, 31}

3

{0, 7, 24, 19}

4

{0, 1, 24, 25}

2

{0, 13, 24, 13}

4

{-8, 17, 24, 17}

1

{4, 5, 24, 17}

2

{4, 17, 24, 5}

4

{-2, 11, 24, 17}

1

{10, -1, 24, 17}

2

{-2, 11, 18, 23}

3

{-2, 11, 30, 11}

4

{-2, 3, 22, 27}

2

{-2, 15, 10, 27}

3{-2, 15, 22, 15}

4

{-2, 9, 22, 21}

2

{-2, 21, 22, 9}

4

{4, -1, 30, 17}

1

{16, -1, 18, 17}

3

{8, -1, 22, 21}

1

{20, -1, 10, 21}

3

{20, -1, 22, 9}

4

{8, -1, 16, 27}

3

{8, -1, 28, 15}

4

{14, -1, 10, 27}

1

{26, -1, 10, 15}

4

{14, -1, 28, 9}

1

{26, -1, 16, 9}

3

{-2, 17, 24, 11}

1

{10, 17, 24, -1}

4

{-2, 17, 18, 17}

3

{-2, 17, 30, 5}

4

2 4 {-2, 21, 10, 21}

3

2

{-2, 27, 10, 15}

4

{4, 17, 30, -1}

1

{16, 17, 18, -1}

3

{8, 21, 22, -1}

1

{20, 9, 22, -1}

2

{20, 21, 10, -1}

3

{8, 15, 28, -1}

2

{8, 27, 16, -1}

3

{14, 9, 28, -1}

1

{26, 9, 16, -1}

3

{14, 27, 10, -1}

1

{26, 15, 10, -1}

2

25

{0, 7, 18, 26}

{0, 1, 24, 26}

2

{0, 13, 12, 26}

3

{-8, 17, 16, 26}

1

{4, 5, 16, 26}

2

{4, 17, 4, 26}

3

{4, 5, 10, 32}

3

{4, 5, 22, 20}

4

{-2, 11, 22, 20}

1

{10, -1, 22, 20}

2

{-2, 11, 16, 26}

3

{-2, 11, 28, 14}

4

{2, -1, 26, 24}

1

{14, -1, 14, 24}

3

{14, -1, 26, 12}

4

{8, -1, 20, 24}

1

{20, -1, 8, 24}

3

{8, -1, 14, 30}

3

{8, -1, 26, 18}

4

{14, -1, 8, 30}

1

{26, -1, 8, 18}

4

1 {20, -1, 26, 6}

4

{4, 11, 4, 32}

2

{4, 23, 4, 20}

4

{-2, 23, 10, 20}

1

{10, 23, -2, 20}

3

{-2, 17, 10, 26}

2

{-2, 29, 10, 14}

4

{10, 17, -2, 26}

2

{10, 29, -2, 14}

4

26

{0, 7, 19, 25}

{0, 1, 25, 25}

2

{0, 13, 13, 25}

3

{0, 5, 17, 29}

2

{0, 17, 5, 29}

3

{0, 17, 17, 17}

4

{-9, 20, 20, 20}

1

{3, 8, 20, 20}

2

{3, 20, 8, 20}

3

{3, 20, 20, 8}

4

{3, 8, 14, 26}

3

{3, 8, 26, 14}

4

{-3, 8, 20, 26}

1

{9, 8, 8, 26}

3

{1, 12, 12, 26}

1

{13, 0, 12, 26}

2

{13, 12, 0, 26}

3

{1, 6, 18, 26}

2

{1, 18, 6, 26}

3

{7, 0, 18, 26}

1

{19, 0, 6, 26}

3

{7, 18, 0, 26}

1

{19, 6, 0, 26}

2

{-3, 8, 26, 20}

1

{9, 8, 26, 8}

4

{1, 12, 26, 12}

1

{13, 0, 26, 12}

2

{13, 12, 26, 0}

4

{1, 6, 26, 18}

2

{1, 18, 26, 6}

4

{7, 0, 26, 18}

1

{19, 0, 26, 6}

4

{7, 18, 26, 0}

1

{19, 6, 26, 0}

2

{3, 14, 8, 26}

2

{3, 26, 8, 14}

4

2

{-3, 20, 8, 26}

1

{-3, 26, 8, 20}

1

{9, 26, 8, 8}

4

{1, 26, 12, 12}

1

{13, 26, 0, 12}

3

{13, 26, 12, 0}

4

{1, 26, 6, 18}

3

{1, 26, 18, 6}

4

{7, 26, 0, 18}

1

{19, 26, 0, 6}

4

{7, 26, 18, 0}

1

{19, 26, 6, 0}

3

{3, 14, 26, 8}

2

{3, 26, 14, 8}

3

2

{-3, 20, 26, 8}

13

{-3, 26, 20, 8}

1

27

{0, 8, 16, 24}

{0, 8, 10, 30}

3

{0, 8, 22, 18}

4

{0, 2, 22, 24}

2

{0, 14, 22, 12}

4

{-8, 18, 22, 16}

1

{4, 6, 22, 16}

2

{4, 18, 22, 4}

4

{-2, 12, 22, 16}

1

{10, 0, 22, 16}

2

{-2, 6, 22, 22}

2

{-2, 18, 22, 10}

4

{4, 0, 28, 16}

1

{16, 0, 16, 16}

3

{8, 0, 20, 20}

1

{20, 0, 8, 20}

3

{20, 0, 20, 8}

4

{8, 0, 14, 26}

3

{8, 0, 26, 14}

4

{14, 0, 8, 26}

1

{26, 0, 8, 14}

4

{14, 0, 26, 8}

1

{26, 0, 14, 8}

3

{4, 12, 28, 4}

2

{4, 24, 16, 4}

3

{-2, 24, 16, 10}

1

{10, 24, 16, -2}

4

28

{0, 8, 16, 25}

{0, 8, 10, 31}

3

{0, 8, 22, 19}

4

{0, 2, 22, 25}

2

{0, 14, 22, 13}

4

{-8, 18, 22, 17}

1

{4, 6, 22, 17}

2

{4, 18, 22, 5}

4

{-2, 12, 22, 17}

1

{10, 0, 22, 17}

2

{-2, 12, 16, 23}

3{-2, 12, 28, 11}

4

{-2, 6, 22, 23}

2

{-2, 18, 10, 23}

3

{4, 0, 28, 17}

1

{16, 0, 16, 17}

3

{8, 0, 20, 21}

1

{20, 0, 8, 21}

3

{20, 0, 20, 9}

4

{8, 0, 14, 27}

3

{8, 0, 26, 15}

4

{14, 0, 8, 27}

1

{26, 0, 8, 15}

4

{14, 0, 26, 9}

1

{26, 0, 14, 9}

3

{-2, 18, 22, 11}

1

{10, 18, 22, -1}

4

{-2, 18, 16, 17}

3

{-2, 18, 28, 5}

4

2

{-2, 24, 16, 11}

4

{4, 18, 28, -1}

1

{16, 18, 16, -1}

3

{8, 22, 20, -1}

1

{20, 10, 20, -1}

2

{20, 22, 8, -1}

3

{14, 10, 26, -1}

1

{26, 10, 14, -1}

3

29

{0, 8, 17, 25}

{0, 8, 11, 31}

3

{0, 8, 23, 19}

4

{0, 2, 23, 25}

2

{0, 14, 23, 13}

4

{-8, 18, 23, 17}

1

{4, 6, 23, 17}

2

{4, 18, 23, 5}

4

{-2, 12, 23, 17}

1

{10, 0, 23, 17}

2

{-2, 6, 23, 23}

2

{-2, 18, 23, 11}

4

{-2, 18, 17, 17}

3

{-2, 18, 29, 5}

4

{-2, 10, 21, 21}

2

{-2, 22, 9, 21}

3

{-2, 22, 21, 9}

4

{4, 0, 29, 17}

1

{16, 0, 17, 17}

3

{8, 0, 21, 21}

1

{20, 0, 9, 21}

3

{20, 0, 21, 9}

4

{8, 0, 15, 27}

3

{8, 0, 27, 15}

4

{14, 0, 9, 27}

1

{26, 0, 9, 15}

4

{14, 0, 27, 9}

1

{26, 0, 15, 9}

3

1{10, 18, 23, -1}

4

{4, 18, 29, -1}

1

{16, 18, 17, -1}

3

{8, 22, 21, -1}

1

{20, 10, 21, -1}

2

{20, 22, 9, -1}

3

{14, 10, 27, -1}

1

{26, 10, 15, -1}

3

{14, 28, 9, -1}

1

{26, 16, 9, -1}

2

30

{0, 9, 17, 25}

{0, 9, 11, 31}

3

{0, 9, 23, 19}

4

{-9, 12, 26, 22}

1

{3, 0, 26, 22}

2

{3, 12, 14, 22}

3

{3, 12, 26, 10}

4

{-5, 16, 18, 22}

1

{7, 4, 18, 22}

2

{7, 16, 6, 22}

3

{1, 10, 18, 22}

1

{13, -2, 18, 22}

2

{1, 4, 18, 28}

2

{1, 16, 18, 16}

4

{1, 8, 22, 20}

2

{1, 20, 10, 20}

3

{1, 20, 22, 8}

4

{1, 8, 16, 26}

3 {1, 8, 28, 14}

4

{1, 14, 10, 26}

2

{1, 26, 10, 14}

4

2

{1, 20, 4, 26}

3

{1, 26, 4, 20}

3

{1, 26, 16, 8}

4

3 {1, 14, 28, 8}

2

{13, -2, 12, 28}

3

{13, -2, 24, 16}

4

{1, 16, 12, 22}

1

{13, 16, 0, 22}

3

4

{1, 16, 6, 28}

3

{7, 16, 0, 28}

1

{19, 16, 0, 16}

4

{11, 20, 0, 20}

1

{23, 8, 0, 20}

2

{23, 20, 0, 8}

4

{11, 14, 0, 26}

2

{11, 26, 0, 14}

4

{5, 20, 0, 26}

1

{17, 8, 0, 26}

2

{5, 26, 0, 20}

1

{17, 26, 0, 8}

4

{23, 2, 6, 20}

2

{23, 14, -6, 20}

3

{17, 2, 6, 26}

1

{29, 2, 6, 14}

4

{23, 20, -6, 14}

3

{23, 20, 6, 2}

4

{17, 26, 6, 2}

1

{29, 14, 6, 2}

2

{3, 6, 26, 16}

2

{3, 18, 26, 4}

4

{3, 6, 20, 22}

3

{3, 6, 32, 10}

4

{-3, 12, 20, 22}

1

{9, 0, 20, 22}

2

{9, 0, 14, 28}

3

{9, 0, 26, 16}

4

31