Posts

Showing posts with the label Applications

Apple - Any IPhone Apps To Test The Touchscreen?

Answer : Sparky works for testing multitouch, so you can try different areas of the screen by holding one finger in a place you know works and move the other elsewhere. If the line breaks, then the second finger is in a location that doesn't work. You can test it full screen (without the Safari UI but the status bar is still present) by adding it to the home screen.

Chess Knight Move In 8x8 Chessboard

Answer : Following the suggestion of @BarakManos: Step 1: Construct a graph where each square of the chess board is a vertex. Step 2: Place an edge between vertices exactly when there is a single knight-move from one square to another. Step 3: Dijkstra's algorithm is an algorithm to find the length of a path between two vertices (squares). It is very classical in graph theory, data structures, and algorithms. There's actually few restrictions that are due to the edge of the board. One of these (or the only case) is moving from A1 to B2 for example. Normally it would take two moves to move one step diagonally, but here that solution would move you of board. Instead you would have to move to C2 or B3 first and then it's a move one step along file or row which is three steps. Then it should be quite straight forward to just testing for solutions. The reason you don't get that many restrictions from the edges is that there will be similar solutions by symmetry...