sequencing problems usually mean a computer must search...

7
Sequencing problems usually mean a computer must search the entire state space for a solution, which is a time-consuming choreintelligent heuristics can help any problems that cannot be solved algorithmically are search problems, and finding a solution that satisfies the sys- tem requirements necessitates searching through a large number of possible solu- tions. For example, in a manufacturing envi- ronment, management must accommodate constraints on start and completion time and schedule particular operations for par- ticular machines. Often, on even the fastest computers, all possible assignments of operations to machines cannot be tested in a reasonable amount of time. In such cases, intelligent heuristics must be developed to prune the search space. We will explore a heuristic for reducing the search space for designing schedules that assign specific operations to specific operators. The specif- ic application we designed with the algo- rithm and heuristic was a round-robin schedule for Cub Scout Pinewood Derbies. However, this heuristic can certainly be ap- plied to manufacturing, scheduling com- mercial air traffic, and scheduling competi- tive events. Since the 1950s, more than 80 million Cub Scouts have built five-ounce wooden cars and raced them in Pinewood Derbies. Pinewood Derbies have traditionally consist- ed of a series of elimination races where only the winner from each heat proceeds to the next round. This set up pleases Scouts with fast cars, but for the unlucky majority it means a single race, waiting for the awards to be announced, and then going home. The best way to explain our Cub Scout problem is to first show a solution. Table 1 shows a schedule for a 15-car, six-round race. Each car is identified with a letter, A through 0. Each car runs six times, twice in each lane (most tracks have three lanes), and only runs against any particular competitor once. This schedule is the end result of our project. Although it looks simple, it was not easy to derive. In our paradigm, we changed the race format for our Cub Scout pack to a round robin (see Table 1). The objective was to let each Scout race more often and throughout the whole event. We decided to use six

Upload: others

Post on 24-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

Sequencing problems usually mean a computer mustsearch the entire state space for a solution, which is atime-consuming chore—intelligent heuristics can help

any problems that cannot besolved algorithmically aresearch problems, and findinga solution that satisfies the sys-

tem requirements necessitates searchingthrough a large number of possible solu-tions. For example, in a manufacturing envi-ronment, management must accommodateconstraints on start and completion timeand schedule particular operations for par-ticular machines. Often, on even the fastestcomputers, all possible assignments ofoperations to machines cannot be tested in areasonable amount of time. In such cases,intelligent heuristics must be developed toprune the search space. We will explore aheuristic for reducing the search space fordesigning schedules that assign specificoperations to specific operators. The specif-ic application we designed with the algo-rithm and heuristic was a round-robinschedule for Cub Scout Pinewood Derbies.However, this heuristic can certainly be ap-plied to manufacturing, scheduling com-mercial air traffic, and scheduling competi-tive events.

Since the 1950s, more than 80 millionCub Scouts have built five-ounce woodencars and raced them in Pinewood Derbies.Pinewood Derbies have traditionally consist-ed of a series of elimination races whereonly the winner from each heat proceeds tothe next round. This set up pleases Scoutswith fast cars, but for the unlucky majorityit means a single race, waiting for the awardsto be announced, and then going home.

The best way to explain our Cub Scoutproblem is to first show a solution. Table 1shows a schedule for a 15-car, six-roundrace. Each car is identified with a letter, Athrough 0. Each car runs six times, twice ineach lane (most tracks have three lanes), andonly runs against any particular competitoronce. This schedule is the end result of ourproject. Although it looks simple, it was noteasy to derive.

In our paradigm, we changed the raceformat for our Cub Scout pack to a roundrobin (see Table 1). The objective was to leteach Scout race more often and throughoutthe whole event. We decided to use six

Page 2: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

Reducing StateSpace Search

in the Classic AlChallenge

By A. Terry Bahill and William J. Karnavas

rounds because that would give each car tworuns in each lane and still keep the wholeevent reasonably short. Switching from anelimination tournament to a round robinproduced two side benefits: The Scoutsraced more often, and lane biases wereeliminated because each car ran in each lanethe same number of times.

The next task was to derive schedules.The schedules had two constraints: Each carhad to run twice in each of the three lanes,and no two cars should run against each

other more than once. We knew from pastPinewood Derby experiences that schedulesfor nine to 39 cars were required. We onlycreated schedules for races where the num-ber of cars was a multiple of three. Whenthe number of cars was not a multiple ofthree, we merely left some lanes empty.

In 1989, we created the first schedules byhand. Each car was assigned a letter, and thefirst round was assigned in alphabetical or-der. The slight deviation from alphabeticalorder shown in Table 1 (interchanging N 29

AI EXPERT • SEPTEMBER 1993

Page 3: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

30

and/) ensured that all heats would have atleast two cars, even if no cars were labeled Nand C). Subsequent rounds were filled byrearranging the first round using rotations,then trial and error. Our 15-car, hand-de-rived schedule supposedly satisfied bothconstraints, hut later we found it satisfiedneither. We therefore decided to give up onmaking the schedules by hand and investi-gated computer algorithms.

RELATED STUDIESKirkman's Schoolgirls Problem is similar toour Pinewood Derby problem. Accordingto Rouse Ball and Coxeter's MathematicalRecreations & Essays, in 1850 T. P. Kirkmansaid: "A school mistress took her 15 girls fora daily walk; the girls were arranged in fiverows of three girls each so that each girl hadtwo companions." The task was then to"Plan the walk for seven consecutive days sothat no girl walks with any of her classmatesin any triplet more than once."

There are several clever tricks for findingsolutions to this problem. One simplegraphical technique works if there are ngirls, such that n = 24w + 3 or n = 24m +9, where m is a member of the set \0, 1, 2,3, . . .\. Solutions exist for all values of nwhere n is an odd multiple of three, butthey involve trial and error and are muchharder to implement.

Kirkman's problem is bigger than oursbecause the girls go on seven walks, whereasour scouts only race six times. However, ourproblem is harder because of the lane re-striction: Each scout must race in each laneexactly twice. We could not adapt any of theKirkman Schoolgirls algorithms to ourproblem. Checking the usefulness of theKirkman solutions for the Pinewood Derbywas a large combinatorial problem that wedecided was not a beneficial endeavor. How-ever, we applied our algorithm and heuristicto the schoolgirl problem on a 486 PC, andso far we found 368 of the 845 solutions.

Montgomery showed how Al heuristicscould be used to improve state-space search-es. The first problem he presented, theMagic Star, took his heuristic two hours tofind 959 solutions. Our algorithm and heu-ristic ran for 1 2 minutes (including valida-tion of each solution) and found 960 solu-tions. His second example was the WhoLives on First Problem: "Five houses are ona certain street, each of a different color,and inhabited by eccentric old men of dif-ferent nationalities, different pets, drinks,and smokes. The following information isknown:

1. The Englishman lives in the red house.2. The Spaniard owns the dog.3. The Ukrainian drinks tea.

16. One of the men owns a zebra.

As you might expect, the problem is to dis-

The Permutation-

This algorithm is best explained by the following small ex-ample. The right column shows the 24 permutations of theletters A, B, C, and D, and the left side shows the operationsneeded to produce each of these permutations.

Step-O:Step-1:Step-2:Step-3:Step-4:Step-5:

Step-6:Step-7:Step-8:Step-9:Step-10:Step-11:

Step-12:Step-13:Step-14:Step-15:Step-16:Step-17:

Step-18:Step-19:Step-20:Step-21:Step-22:Step-23:

Initial sequenceSwap 1 and 0 of sequence above

Swap 2 and 0 of initial sequenceSwap 1 and 0 of sequence above

Swap 2 and 1 of initial sequenceSwap 1 and 0 of sequence above

Swap 3 and 0 of initial sequenceSwap 1 and 0 of sequence above

Swap 2 and 0 in sequence of Step-6Swap 1 and 0 of sequence above

Swap 2 and 1 in sequence of Step-6Swap 1 and 0 of sequence above

Swap 3 and 1 of initial sequenceSwap 1 and 0 of sequence above

Swap 2 and 0 in sequence of Step-12Swap 1 and 0 of sequence above

Swap 2 and 1 in sequence of Step-12Swap 1 and 0 of sequence above

Swap 3 and 2 of initial sequenceSwap 1 and 0 of sequence above

Swap 2 and 0 in sequence of Step-18Swap 1 and 0 of sequence above

Swap 2 and 1 in sequence of Step-18Swap 1 and 0 of sequence above

Position3210A B C DA B D CA D C BA D B CA CBDA C O B

D B C AD B A CD A CBD A B CDCB AD C A B

C B A DC B D AC D A BC DB AC A B DC A DB

B A C DB A DCB O C AB D A CB C A DBC D A

The steps can be assigned a level, S, based on the highestposition they swap. Steps-6, 12, and 18 all swap positionthree with lower positions and thus are called level-3 swaps.Steps-2 and 4 (and all their repetitions) swap position twowith lower positions and thus are called level-2 swaps. Step-1(and all its repetitions) swaps position one with its lower posi-tion, zero, so it is the level-1 swap. A level-6' swap changesthe character at position 5 with lower positions starting atzero and ending with 5-1: Therefore, it can make 5 swapsbefore the sequence repeats.

A level-5 swap changes characters in its working sequencewith the last sequence output by a higher level (the initial se-quence is the highest level). So a level-1 swap is always doneto the previous output. A level-2 swap is done to the last lev-eI-3 or higher output. The level-3 swap is always carried outon the initial sequence (for the four-character example).

To implement the algorithm, all that is needed is to holda count and working sequence for each level. Each time alevel exhausts all the permutations it can make, the higherlevel is invoked. The higher level makes its swap and then

AI EXPERT • SEPTEMBER 1993

Page 4: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

cover which man lives in which house, whatthe color of each house is, and what eachman's pet, drink, and smoke is."

There are 25 billion possibilities, but byusing an intelligent heuristic, he was able to

Generating Algorithm

resets the counts of the lower levels and sets their workingsequence to its present output. This lends itself easily to a re-cursive implementation but can also be implemented itera-tively. For speed, we implemented it as an iterative functionthat returns the next permutation of the sequence and onlyrequired a small record be kept from call to call. The follow-ing Pascal program shows this implementation:

Program Permutations( Output );Const

N = 4;NFact = 24;

TypePermStr = Array[O..N-1] of Char?

VarCounts: Array[1..N] of Integer;WorkSequence: Array[1..N] of PermStr;PrintStr: PermStr;i: Integer;

Procedure Permutation( Level: Integer; Var OutStr: PermStr );Var C: Char;Begin

If Counts[Level] >= 0 Then BeginOutStr := WorkSequence[Level];C := OutStr[Level]; (* swap 2 characters *)OutStr[Level] := OutStr[Counts[Level]];OutStr[Counts[Level]] := C;

Counts[Level] := Counts[Level] - 1;End Else Begin

Permutation(Level+1, OutStr);Counts[Level] := Level-1;WorkSequence[Level] := OutStr

End;End;

(* Main program *)Begin

(* set up variables used by Permutation *)For i := 1 to N-1 Do

Counts[i] := -1;CountsfN] := N;WorkSequence[N] := 'ABCD';

(* find and print the permutations of a sequence *)For i := 1 to NFact Do Begin

Permutationf 1, PrintStr );Nriteln( PrintStr )

EndEnd.

solve the problem on an IBM PC in twohours. Our program solved this problem intwo minutes. However, we are not claimingthat our program is better because it is fas-ter: Although we used the same computer,we used a different language. Our programis more general since we used the exactsame code in each case to generate the per-mutations and only modified the functionsthat check constraints.

RANDOM TRIALS SOLUTIONWe will use the following terminology to de-scribe Pinewood Derbies. We will refer toeach set of cars running down the track atthe same time as a "heat." The number ofheats necessary for every car in the divisionto run once constitutes a "round." A setnumber of rounds constitutes a "divisionalrace." Thus, for 15 cars to run six timeseach, the divisional race consists of sixrounds of five heats each, as shown in Table1. Finally, several divisional races constitutesa "derby." Typically the divisions are aggre-gated by age, with four or five divisions be-ing common in a Cub Scout pack.

Our first computerized scheduling systemwas a simple program that randomly or-dered cars in races. It successfully producedround-robin schedules for 18 or more cars.The first round was assigned in alphabeticalorder as was done by hand. The programsuccessively filled the slots in each heat ofeach round using a random number gener-ator to assign a car. If the car had been inthe round already, or violated either con-straint, it was rejected, and the next car inalphabetical order was tried. If all cars weretried in a slot without success, the partialround was discarded and restarted. If thenumber of restarts for a round exceeded athreshold (66 was arbitrarily used), the pro-gram cleared all assignments from roundtwo on and started again. Within minutesthe program produced schedules for divi-sional races of 18 or more cars. However,the 15-car, six-round divisional race re-mained unsolved, even after letting the pro-gram churn for more than 24 hours.

Why did the random assignment programfail for 15 cars? By the calculations previous-ly mentioned, there was no logical reasonwhy the 15-car, six-round schedule couldnot be found. Our program worked well for18 and more cars, so there was no reason toassume a programming error. Yet, it ran forover a day without finding a solution. Be-cause it was a random guesser, there was noway to know if it would ever terminate. Thissituation created the impetus for us to seekout deterministic methods.

DETERMINISTIC METHODSIn an attempt to find a correct 15-car, six-round schedule, we explored two determin- 31

AI EXPERT • SEPTEMBER 1993

Page 5: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

LANE1 LANE 2 LANE 3

HEAT1

HEAT 2

HEAT 3

HEAT 4

HEATS

HEAT1

HEAT 2

HEAT 3

HEAT 4

HEATS

HEAT1

HEAT 2

HEATS

HEAT 4

HEATS

HEAT1

HEAT 2

HE AT 3HE AT 4

HEATS

HEAT1

HEAT 2

HEATS

HEAT 4

HEATS

HEAT1

HEAT 2

HEAT 3

HEAT 4

HEATS

A

D

G

N

M

C

D

AE

I

L

E

H1

O

MB

GN

F

J

F

CH

K

J

B

K

L

O

ROUND 1

B

E

H

K

J

ROUND 2FBN

K

L

ROUNDSJGFM

A

ROUND 4CE

A

0I

ROUNDSDLI

M

0

ROUNDSHN

D

GC

CF

I

L

0

G

H

M

J0

C

NK

BD

D

L

KH

J

G

A

NE .B

AFI

ME

TABLE 1. A 15-car,six-round race

table.

32

istic methods for finding a solution or prov-ing that none exists. One was a heuristicsearch of the 15 factorial (15!) permutationsof cars that make up each round. This pro-cess involved finding a fast algorithm forgenerating the permutations of a sequenceand checking each sequence for constraintcompliance. The other method was an inte-ger programming formulation that we willnot discuss.

First, we considered the brute force ap-proach of trying all potential schedules. Theplan was simply to generate all 15! permuta-tions of the ordering of the cars in eachround and then check each against all pre-viously accepted rounds for lane and com-petitor conflicts until we could find a set ofsix.

In this approach, we encountered twoproblems. First, we could riot test all 15! per-mutations (about 1012) per round in any rea-sonable time period. The second problemwas our lack of an appropriate algorithmfor generating all the permutations of a se-quence. This problem was much morepressing since it prevented even attemptingan exhaustive search. All permutation algo-rithms we had seen generated the whole setof permutations of a sequence in one shot:We did not have the resources to store allthese sequences. The brute force approachwas only feasible if each sequence was gen-erated, tested, and then accepted and savedor rejected and discarded. Therefore, wedeveloped a new recursive algorithm thatcan be used to generate one permutation ata time.

PERMUTATION GENERATINGThe permutation-generating algorithmworks by breaking the problem of generat-ing the permutations of a sequence of acharacters into the problem of generatingthe permutations of a sequence of n - 1characters, n times. This continues until n istwo, where the permutations are the se-quence and the sequence reversed. Thus,the permutations of AB are AB and BA. Togenerate the permutations of ABC, first findthe two permutations of AB and append C,then find the two permutations of AC andappend B, and finally find the two permuta-tions of CB and append A. To generate thepermutations of the sequence ABCD, youmust find the six permutations of ABC andappend D, then find the six permutations ofABD and append C, and so on for ADC andB, and finally DBC and A. This example isshown in the sidebar.

This algorithm can be implemented as arecursive function that returns one permu-tation each time it is called. Between func-tion calls, a record stores a count of how farit has progressed and the sequence of char-acters being permuted for each level of re-cursion. A simple Pascal version is also givenin the sidebar.

Using this algorithm, we set out to find aschedule for a 15-car, six-round divisionalrace; it ran for four weeks on an AT&T3B2/400 without termination or solution. Tosee the probable cause of this failure, com-pare the first round of the 15-car schedule(ABC DEF GHIJKL MNO) to the first per-mutation to be tried for the second round(ABC DEF GHI JKL MON): Only N and Ohave changed places. Since the algorithmmodifies the sequence like a counter start-ing in the "least significant" position (on theright end), it will require 13! permutationcalls and constraint checks before B ischanged, which is necessary to prevent Aand B from racing against each other.

AI EXPERT • SEPTEMBER 1993

Page 6: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

This led to our first heuristic rule: Findthe constraint conflict in the highest posi-tion and perform a "super-permutation" atthat position. A super-permutation consistsof all the less-significant individual permuta-tions needed to cause a particular characterin the sequence to change. A modificationof the permutation procedure implementedthe super-permutation in an extremely effi-cient manner. By forcing all permutationsto the right of a particular position to thinkthat they are done, the sequence can per-mute to a new character in another positionin one jump. A super-permutation requiresno more work than a normal permutationand is as simple as properly setting countersof the less-significant positions in the per-mutation generator.

We modified the search program to im-plement the heuristic and used the new abil-ity of the permutation procedure. This pro-cess involved redefining the constraintchecking functions to return the positionrather than the presence of conflicts. Thisway, the high position conflicts could be re-solved in a few permutation cycles, eliminat-ing (p-1)! needless permutations and checks.This made large problems such as a 39-car,six-round race feasible for systematicsearch, even though 39! is far too large toexhaustively search.

Our systematic search started with the

first round set to alphabetic order. Then wedid permutations using the heuristic until avalid round was found. We saved it andsearched on from there for the next round.This process made the search faster, and wesaw no reason to start each round fromscratch and recheck a previously searchedregion of the state space.

This heuristic search program was run onlarge schedules and produced rapid resultsfor n = 21. The 15- and 18-car schedulesterminated, claiming that no solution exist-ed. This situation presented quite a prob-lem since an 18-car schedule had alreadybeen found by the random-assignment tech-nique.

The solution to this dilemma was to lookat the system used by the random assigner.It would start over if it decided that a par-ticular solution seemed stuck. The permuta-tion search did not try to restart, presumingthat any working round was as good as an-other and cannot preclude the finding oflater rounds. But this presumption w7as nottrue. A dead end can be reached in only thesecond round, for example, by placing carsA, D, Gin Heat 1, cars B, E, H in Heat 2, andcars C, F, I in Heat 3. (The lane assignmentsare not important.) Of the remaining cars,ythrough O, no three can be found that havenot already raced one of the others. Moreexplicitly, the program tried to solve the

ADVERTISERSPAGE CIRCLENO. NO.

ABTECH

AMERICAN INTERFACECOMPUTER

AMZIOD

ARTIFICIAL INTELLIGENCETECH

B.I.M

BYTE DYNAMICS

GENSYM

HNC—HECHT-NIELSEN

HESS CONSULTING

HYPERLOGIC

ITASCA SYSTEMS

LEVEL5 RESEARCH .

LOGIC PROGRAMMINGASSOCIATES

MAN MACHINE INTERFACES

23

19

14

39

C2

C3

8

39

6

1

23

39

13

11

35

36

9

16

1

19

30

17

6

2

12

18

NEURALWARE INC

NOVA CAST

NEURON DATA

PARALOGIC

PINNACLE DATA CORP. ..

QUINTUS CORP

REDUCT SYSTEMS

SOFT WAREHOUSE INC. ..

SAPIENS SOFTWARE

THE MATHWORKS INC. ..

THE ART OF SOFTWAREI N C . . . . , . . . ,

VENUE CORP

VISUAL SOLUTIONS

WARD SYSTEMS ..

2

25

C4

13

25

4

12

6

15

3

15

20

34

32

8

33

31

14

4

37

7

5

10

The index on this page is provided as a service to our readers.The publisher does not assume any l iabil i ty for errors or omissions.

33

AI EXPERT • SEPTEMBER 1993

Page 7: Sequencing problems usually mean a computer must search ...sysengr.engr.arizona.edu/publishedPapers/ReducingSearc… · ever, we applied our algorithm and heuristic to the schoolgirl

problem using only a 15! state space. Thestate space is 15! per round, and in this casewe must find schedules for five rounds, sothe true state space is (15!)5.

The ability to backup was added to thesearch heuristic by saving not only the se-quence derived for each round but also thestate of the permutation-generating algo-rithm. If the permutation generatorreached the final permutation of the seriesbefore a sequence was accepted for a round,the heuristic skipped back to the previousround and resumed searching for anothervalid sequence for that round. Using this re-vised heuristic, our program quickly found asolution for the 18-car, six-round problem.After running three weeks on an AT&T3B2/400, it finally found a solution for the15-car, six-round problem, thus proving theexistence of a solution, shown in Table 1.Schedules derived by this program for nine-to 39-car, six-round divisional races havebeen published in Chapman, Bahill, andWymore.

UNRESOLVED PROBLEMSDuring our 1989 Pinewood Derby, usingour manually derived 12-car, six-roundschedule, a parent noticed two cars that didnot race each other. Subsequent investiga-tions showed that 13 pairs of cars did notrace each other. So we ran our program andfound a good, but not perfect, solution forthis 12-car race. In this solution, all carsrace in each lane twice and no car races anyother car more than twice; but. cars B and /never race each other. We added a thirdconstraint for nine-car and 12-car races,namely that every car race every other car.Our program searched for six weeks with-out finding a better solution. We are stilllooking for a perfect solution for the 12-carrace.

Recently, we encountered an interestingphenomenon. When we discussed this prob-lem with our eminent colleagues who didresearch in scheduling, seven times in a rowwe heard them say, "Aw, that's an easy prob-lem. I solved that years ago." However,when we asked them to use their algorithmson our 12-car problem, they produced nosolutions. When pushed, they said, "Evi-dently our algorithm is good for our prob-lem, but it cannot stretch to your problem."After discussing this problem for threeyears, we have concluded that schedulingproblems are indeed difficult. Each re-searcher spends time and money solving aparticular problem. At the end of this en-deavor, they hope that their technique isgeneral. However, when a problem comesalong that their algorithm cannot solve,they must reluctantly admit that their algo-rithm only works for a particular problem,not for a general class.

EFFICIENCY VS. FLEXIBILITYWe do not believe that efficiency is the mostimportant property of an algorithm: Wethink that flexibility is more important. Wehave many computers, so we have no prob-lem with letting a particular computer com-pute for five or six weeks finding a solutionto our problem, as long as it finds a solution.(Multitasking operating systems and resu-mable programs let us use the computer forother tasks when necessary.) We realize thisis not feasible in all situations, but it is prac-tical in many instances such as ourPinewood Derby. We do not want to solveand resolve a problem with more and moreefficient algorithms. Rather, we want to geta reasonable solution with a technique thatcan be reapplied to different problems. Pro-gramming time is expensive, but computertime is very cheap. Our algorithm and heu-ristic let us write programs quickly for thethree problems mentioned under relatedstudies and can be easily applied to prob-lems such as the traveling salesman problemand the Chinese Mailman problem.

When we started writing programs forPinewood Derby schedules, we had difficul-ty assigning items to processes with con-straints. We investigated several methods ofsolution. Brute force enumeration was in-feasible: It took too long. Integer program-ming could prove the existence or nonexis-tence of a solution, but it required resourceswe did not have. We finally wrote an intelli-gent enumeration heuristic that solved ourscheduling problem. In the process, we alsodeveloped an efficient and versatile algo-rithm for generating the permutations of asequence.

The intelligent-search heuristic can beeasily applied to the solution of other sched-uling problems by changing the constraintchecking procedures. The only requirementneeded to achieve significant improvementover full n! or (n!)m search is that the con-straints are such that single positions of con-flict are identifiable and resolvable. If theproblem is confined to the permutations ofa single sequence or can be cast as such, theheuristic search can find solutions quiterapidly. [Jj

The authors thank Bill Velez for pointing outKirkman's Schoolgirls Problem and SiwrajeetSen for showing how to state our problem as aninteger programming problem.

SUGGESTED READINGRouse Ball, W.W., and H.S.M. Coxeter. Mathematical

Recreations & Essays. New York, N.Y.: Macmillan, 1962,pp. 267-298.

Montgomery, G. "Improving State Space Searches,"AI Expert, Mar., 1992, pp. 39-43, and "Mastermind: Im-proving the Search," AI Expert, April 1992, pp. 40-47.

Chapman, W.L., A.T. Bahill, and W. Wymore. Engi-neering Modeling and Design. Boca Raton, Fla.: CRCPress Inc., 1992.

A. Terry Bahill is aprofessor ofsystems engineeringat the University ofArizona at Tucson.He has authoredseveral books,includingBioengineering:Biomedical, Medical,and ClinicalEngineering andKeep Your Eye onthe Ball: TheScience andFolklore of Baseball.

William J. Karnavasis a Fellow forneurophysiology inthe department ofneurosurgery at theUniversity ofPittsburgh MedicalSchool. 35

AI EXPERT • SEPTEMBER 1993