07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

84 Henrik Björklund<br />

(3) If φ has at least one nonterm<strong>in</strong>al child φ ′ ,letφ ← φ ′ and restart from step<br />

2. If φ has no nonterm<strong>in</strong>al children that have not been searched, and φ is<br />

the root of the tree, then term<strong>in</strong>ate. If φ has no nonterm<strong>in</strong>al children that<br />

have not been searched but φ is not the root, then set φ ← parent(φ) and<br />

restart from step 3.<br />

In other words, the procedure looks one step ahead before deepen<strong>in</strong>g the<br />

search. Naik [Nai97] claims that this approach mostly solves the major problem<br />

with pure depth first search, that longer sequences are found before shorter<br />

sequences for the same state. While this is true <strong>in</strong> some cases, it somewhat<br />

overstates the merit of the method. For some mach<strong>in</strong>es, the procedure will still<br />

be likely to f<strong>in</strong>d long sequences before much shorter ones.<br />

If we are only <strong>in</strong>terested <strong>in</strong> relatively short sequences, like <strong>in</strong> the conformance<br />

test<strong>in</strong>g algorithm by Sabnani and Dahbura discussed <strong>in</strong> Section 3.4.1 [SD88], the<br />

search depth of Naik’s algorithm can of course be limited.<br />

3.4.3 Genetic Algorithms<br />

Guo, Hierons, Harman, and Derderian recently suggested the use of genetic<br />

algorithms to f<strong>in</strong>d UIO sequences [GHHD04]. The basic idea of genetic algorithms<br />

is to mimic the process of natural selection <strong>in</strong> nature. An algorithm keeps<br />

a collection of possible solutions to the problem at hand, called the population,<br />

and measures the quality of its members us<strong>in</strong>g a fitness function. Thebest<strong>in</strong>dividuals<br />

<strong>in</strong> the population are paired together us<strong>in</strong>g recomb<strong>in</strong>ation to form the<br />

next generation. Random changes of <strong>in</strong>dividuals, called mutations, can also be<br />

applied to <strong>in</strong>dividuals. For a survey on the theory of genetic algorithms, see<br />

[Müh97].<br />

In more detail, an <strong>in</strong>dividual is assumed to be a sequence of some k<strong>in</strong>d,<br />

and all <strong>in</strong>dividuals are generally assumed to have the same length. To start<br />

computation, an <strong>in</strong>itial population is generated randomly, and the fitness of each<br />

<strong>in</strong>dividual is computed us<strong>in</strong>g the fitness function. To form the next generation,<br />

two <strong>in</strong>dividuals are selected <strong>in</strong> some way that gives preference to high fitness<br />

values. The algorithm has a set value for crossover probability p. Withthis<br />

probability, the two parents are mixed to form an offspr<strong>in</strong>g. With probability<br />

1−p, a copy of one of the parents are <strong>in</strong>stead added to the next generation. This<br />

is repeated until the new population is full. Accord<strong>in</strong>g to some other probability<br />

distribution, each <strong>in</strong>dividual <strong>in</strong> the new generation is mutated, i.e., randomly<br />

changed. This is <strong>in</strong>tended to prevent the process from gett<strong>in</strong>g stuck <strong>in</strong> local<br />

m<strong>in</strong>ima. The algorithm proceeds to create a preset number of further generation,<br />

and then returns the f<strong>in</strong>al population. Ideally, all <strong>in</strong>dividuals are then identical<br />

and represent an optimal solution to the problem.<br />

In the approach of Guo et al. [GHHD04], the population is a set of <strong>in</strong>put<br />

sequences, all of the same length. The idea is to use a fitness function that<br />

rewards sequences whose prefixes are the <strong>in</strong>put components of UIO sequences<br />

for many states, while punish<strong>in</strong>g unnecessarily long sequences. All sequences<br />

<strong>in</strong> the population are assumed to have the same length k. Given a sequence

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!