algorithm design techniques distance graph::shortestst distance dt tempifs = return dt for each vertex adjacent to tmp shortestvt )ifcs, tmp dt dt cs, tmpreturn dt figure recursive shortest-path algorithm (pseudocode *repeat part (aif is allowed to be rectangleinstead of square largest is measured by area even if the computer has move that gives an immediate winit may not make it if it detects another move that is also guaranteed to win some early chess programs had the problem that they would get into repetition of position when forced win was detectedthereby allowing the opponent to claim draw in tic-tac-toethis is not problembecause the program eventually will win modify the tictac-toe algorithm so that when winning position is foundthe move that leads to the shortest win is always taken you can do this by adding -depth to comp_win so that the quickest win gives the highest value write programto play five-by-five tic-tac-toewhere four in row wins can you search to terminal nodesthe game of boggle consists of grid of letters and word list the object is to find words in the grid subject to the constraint that two adjacent letters must be adjacent in the grid and each item in the grid can be usedat mostonce per word write program to play boggle write program to play maxit the board is represented as an -by- grid of numbers randomly placed at the start of the game one position is designated