CS代写 A mole is disturbing a row of five graves. The mole is always

A mole is disturbing a row of five graves. The mole is always
underneath one of the graves.

1. Each day, we may attempt to catch the mole by

Copyright By PowCoder代写 加微信 powcoder

digging up a grave. If we found the mole, we win;
otherwise, we put the grave back in order and go to sleep.
2. Each night, the mole must move from its current position to an
adjacent grave.

Find a sequence of digs that is guaranteed to find the mole.

Which positions *could* the mole be at based on the info we have:

{1,2,3,4,5}

When we dig up 2, the possible positions the mole could be at are

{1,3,4,5} when we go to bed

{2,3,4,5} when we wake up

Now where should we dig? 3

{2,4,5} when we go to bed

{1,3,5,4} when we wake up

Now where should we dig? 4

{1,3,5} when we go to bed
{2,4} when we wake up

Where next? 2
{4} when we go to bed
{3,5} when we wake up

{5} when we go to bed
{4} we wake up

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com