Affine transformation: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
c/expansion/scaling/ ; use language consistent with accompanying text
clarified image explanation. blue was ambiguous.
Line 1: Line 1:
{{Hide in print|[[Image:Knight's tour anim 2.gif|right|thumb|250px|An open knight's tour of a chessboard]]}}{{Only in print|[[Image:Knight's tour.svg|right|thumb|250px|An open knight's tour of a chessboard]]}}
{{Hide in print|[[Image:Knights-Tour-Animation.gif|right|thumb|250px|An animation of a Knight's Tour on a 5 by 5 board.]]|[[Image:knightstour5x5.svg|right|thumb|250px|An open knight's tour on a 5 by 5 board.]]}}


A '''knight's tour''' is a sequence of moves of a knight on a [[chessboard]] such that the knight visits every square only once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is ''closed'', otherwise it is ''open''. The exact number of open tours on an 8x8 chessboard is still unknown.


The '''knight's tour problem''' is the [[Mathematical chess problem|mathematical problem]] of finding a knight's tour. Creating a program to find a knight's tour is a common problem given to [[computer science]] students.<ref>H. M. Deitel, P. J. Deitel. "Java How To Program Fifth Edition." ''Prentice Hall'', Upper Saddle River, New Jersey, pp. 326–328. 2003.</ref> Variations of the knight's tour problem involve chessboards of different sizes than the usual 8 × 8, as well as irregular (non-rectangular) boards.
  Direc - TV DVR by Tivo can be a revolutionary merchandise that merges the very best features of two outstanding products. The [http://Beingartist.com/nine-ridiculous-rules-about-dvr-4-channel/ expense] of these sorts of [http://wakei.bigwave.mobi/mediawiki/index.php?title=Speco_16_Channel_Dvr_No_Longer_a_Mystery CCTV cameras] depends on the lens found in it, the facilities you desire to get from it along with the brand that you desire to choose. Cctv dvr hdd file system On one other hand, when you desire top of the line, networked, security DVR software and systems, you will know what you should look for also.<br><br>In practice, most CCTV cameras simply record and archive footage continuously and the videos are only rolled out for viewing if the crime has been  [http://kite.boreal.org/Mailbot/redirect.cfm?MessageID=912&ListID=71&Link=cctvdvrreviews.com want] committed inside the area. There are many [http://www.Crazme.com/profile/41751/BaDraft cheap security] camera starter kits available bundled with 2, 4 or 6 cameras plus a DVR within the package too.<br><br>Such ideas are certainly not "totally that random" because it still is relevant on the topic and [http://www.Crazme.com/profile/41751/BaDraft concepts discussed] prior on the assigned coursework. In this stage from the technical writing process  [http://cn.fleurdechinehotel.com/gate/gb/cctvdvrreviews.com cctv dvr software manufacturers] you are going to [http://wikicharities.org/index.php?title=Best_Cctv_Dvr_Network_Setup_Tips_You_Will_Read_This_Year determine] which documents as well as other information that you just will use for  best cctv dvr reviews your writing. [http://Go.Eniro.dk/lg/ni/kommunerogregioner/kommunerogregioner/midtjylland/cat-4059/http:/cctvdvrreviews.com cctv dvr pc cms software for our cctv dvr] xeno cctv dvr As a business owner, speaker, consultant, trainer,  cctv video camera manufacturers or any professional that markets their services, using a published  cctv dvr recorder 8 channel  [http://www.okjs.pe.kr/?document_srl=1233860 best open source cctv dvr software] book gives you a tremendous edge on your competition. These directories allow you to definitely reprint the content as long since the resource box is included in the end in the article.
 
== Theory ==
[[Image:Knight's graph showing number of possible moves.svg|left|thumb|270px|[[Knight's graph]] showing all possible paths for a Knight's tour on a standard 8×8 chessboard. The numbers on each node indicate the number of possible moves that can be made from that position.]]
 
The knight's tour problem is an instance of the more general [[Hamiltonian path problem]] in [[graph theory]]. The problem of finding a closed knight's tour is similarly an instance of the [[Hamiltonian cycle problem]]. Note, however, that unlike the general [[Hamiltonian path problem]], the knight's tour problem can be solved in [[linear time]].<ref name=Conrad1994>{{Cite journal |first=A. |last=Conrad |first2=T. |last2=Hindrichs |first3=H. |last3=Morsy |lastauthoramp=yes |first4=I. |last4=Wegener |title=Solution of the Knight's Hamiltonian Path Problem on Chessboards |journal=Discrete Applied Mathematics |volume=50 |issue=2 |pages=125–134 |year=1994 |doi=10.1016/0166-218X(92)00170-Q }}</ref>
{{clear}}
 
==History==
[[Image:Turk-knights-tour.svg|right|thumb|250px|The Knight's tour as solved by [[The Turk]], a chess-playing machine hoax. This particular solution is closed (circular), and can thus be completed from any point on the board.]]
 
The earliest known reference to the Knight's Tour problem dates back to the 9th century AD.  In Rudraṭa's ''[[Kavyalankara]]''<ref>
{{cite book
|author = Satyadev, Chaudhary
|title =  Kavyalankara of Rudrata (Sanskrit Text, with [[Hindi]] translation);
|publisher = Parimal Sanskrit Series No. 30
|location = Delhitraversal
}}
</ref> (5.15), a Sanskrit work on Poetics, the pattern of a knight's tour on a half-board has been presented as an elaborate poetic figure ("citra-alaṅkāra") called the "turagapadabandha" or 'arrangement in the steps of a horse.' The same verse in four lines of eight syllables each can be read from left to right or by following the path of the knight on tour. Since the Indic writing systems used for Sanskrit are syllabic, each syllable can be thought of as representing a square on a chess board. Rudrata's example is as follows:
 
से ना ली ली ली ना ना ना ली
 
ली ना ना ना ना ली ली ली ली
 
न ली ना ली ली ले ना ली ना
 
ली ली ली ना ना ना ना ना ली
 
se nā lī lī lī nā nā lī
 
lī nā nā nā nā lī lī lī
 
na lī nā lī le nā lī nā
 
lī lī lī nā nā nā nā lī
 
For example, the first line can be read from left to right or by moving from the first square to second line, third syllable (2.3) and then to 1.5 to 2.7 to 4.8 to 3.6 to 4.4 to 3.2.
 
One of the first mathematicians to investigate the knight's tour was [[Leonhard Euler]]. The first procedure for completing the Knight's Tour was [[Knight's Tour#Warnsdorff's rule|Warnsdorff's rule]], first described in 1823 by [[H. C. von Warnsdorff]].
 
In the 20th century, the [[Oulipo]] group of writers used it among many others. The most notable example is the {{nowrap|10 × 10}} Knight's Tour which sets the order of the chapters in [[Georges Perec]]'s novel ''[[Life: A User's Manual]]''. The sixth game of the [[2010 World Chess Championship]] between [[Viswanathan Anand]] and [[Veselin Topalov]] saw Anand making 13 consecutive knight moves (albeit using both knights) -– online commentors jested that Anand was trying to solve the Knight's Tour problem during the game.
 
== Existence ==
Schwenk<ref>{{cite journal
| author=Allen J. Schwenk
| title=Which Rectangular Chessboards Have a Knight’s Tour?
| journal=Mathematics Magazine
| year=1991
| pages=325–332
}}</ref> proved that for any {{nowrap|''m'' × ''n''}} board with ''m'' ≤ ''n'', a closed knight's tour is always possible ''unless'' one or more of these three conditions are met:
# ''m'' and ''n'' are both odd
# ''m'' = 1, 2, or 4
# ''m'' = 3 and ''n'' = 4, 6, or 8.
 
Cull ''et al.'' and Conrad ''et al.'' proved that on any rectangular board whose smaller dimension is at least 5, there is a (possibly open) knight's tour.<ref name=Cull1978/><ref name=Conrad1994/>
 
== Number of tours ==
On an {{nowrap|8 × 8}} board, there are exactly 26,534,728,821,064 [[Glossary of graph theory#Direction|directed]] closed tours (i.e. two tours along the same path that travel in opposite directions are counted separately, as are rotations and reflections).<ref>{{cite journal
| author=Martin Loebbing; Ingo Wegener
| title=The Number of Knight's Tours Equals 33,439,123,484,294 — Counting with Binary Decision Diagrams
| journal=The Electronic Journal of Combinatorics
| volume=3
| issue=1
| pages=R5
| year=1996
| url=http://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r5
}} '''Remark:''' The authors later [http://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r5/comment admitted] that the announced number is incorrect. According to McKay's report, the correct number is 13,267,364,410,532 and this number is repeated in Wegener's 2000 book.</ref><ref>{{cite journal
| authorlink=Brendan McKay
| author=Brendan McKay
| title=Knight's Tours on an 8x8 Chessboard
| journal=Technical Report TR-CS-97-03
| publisher=Department of Computer Science, Australian National University
| year=1997
| url=http://www.combinatorics.org/ojs/index.php/eljc/article/downloadSuppFile/v3i1r5/mckay
}}</ref><ref>{{cite book
| author= Wegener, I.
| title=Branching Programs and Binary Decision Diagrams
| publisher=Society for Industrial & Applied Mathematics
| year=2000
| isbn=0-89871-458-3
| url=http://books.google.com/?id=-DZjVz9E4f8C&pg=PA369&dq=532}}</ref> The number of ''[[Glossary of graph theory#Direction|undirected]]'' closed tours is half this number, since every tour can be traced in reverse. There are 9,862 undirected closed tours on a {{nowrap|6 × 6}} board.<ref>{{MathWorld|urlname=KnightsTour|title=Knight's Tour}}</ref>
 
The number of open tours for 8x8 board remains unknown. The number of directed open tours on <math>n\times n</math> board for ''n'' = 1, 2, … are:
: 1, 0, 0, 0, 1728, 6637920, 165575218320, … {{OEIS|A165134}}.
 
== Finding tours with computers ==
There are quite a number of ways to find a knight's tour on a given board with a computer. Some of these methods are [[algorithms]] while others are [[heuristics]].
 
=== Brute force algorithms ===
A [[brute-force search]] for a knight's tour is impractical on all but the smallest boards; for example, on an 8x8 board there are approximately 4×10<sup>51</sup> possible move sequences,<ref>{{cite web |url=http://www.josiahland.com/?p=781 |title = Enumerating the Knight's Tour}}</ref> and it is well beyond the capacity of modern computers (or networks of computers) to perform operations on such a large set.
 
=== Divide and conquer algorithms ===
By dividing the board into smaller pieces, constructing tours on each piece, and patching the pieces together, one can construct tours on most rectangular boards in [[Time_complexity#Polynomial_time|polynomial time]].<ref name=Cull1978>{{cite journal|last = Cull|first = P.|coauthors=De Curtins, J.|title = Knight's Tour Revisited|journal = Fibonacci Quarterly|volume = 16|year = 1978|pages = 276–285 |url=http://www.fq.math.ca/Scanned/16-3/cull.pdf}}</ref><ref>{{cite journal|last = Parberry|first = Ian|title = An Efficient Algorithm for the Knight's Tour Problem|journal = Discrete Applied Mathematics|volume = 73|year = 1997|pages = 251–260|doi=10.1016/S0166-218X(96)00010-8 | url=http://larc.unt.edu/ian/pubs/algoknight.pdf }}</ref>
 
=== Neural network solutions ===
[[Image:Knight's Tour 24x24.svg|right|thumb|250px|Closed Knight's Tour on a {{nowrap|24 × 24}} board solved by a neural network.]]
The Knight's Tour problem also lends itself to being solved by a [[neural network]] implementation.<ref>Y. Takefuji, K. C. Lee. "Neural network computing for knight's tour problems." ''Neurocomputing'', 4(5):249–254, 1992.</ref> The network is set up such that every legal knight's move is represented by a [[Artificial neuron|neuron]], and each neuron is initialized randomly to be either "active" or "inactive" (output of 1 or 0), with 1 implying that the neuron is part of the final solution. Each neuron also has a state function (described below) which is initialized to 0.
 
When the network is allowed to run, each neuron can change its state and output based on the states and outputs of its neighbors (those exactly one knight's move away) according to the following transition rules:
 
::<math>
U_{t+1} (N_{i,j}) = U_t(N_{i,j}) + 2 - \sum_{N \in G(N_{i,j})} V_t(N)
</math>
 
::<math>
V_{t+1} (N_{i,j}) = \left\{
\begin{array}{ll}
1 & \mbox{if}\,\, U_{t+1}(N_{i,j}) > 3\\
0 & \mbox{if}\,\, U_{t+1}(N_{i,j}) < 0\\
V_t(N_{i,j}) & \mbox{otherwise},
\end{array} \right.
</math>
 
where <math>t</math> represents discrete intervals of time, <math>U(N_{i,j})</math> is the state of the neuron connecting square <math>i</math> to square <math>j</math>, <math>V(N_{i,j})</math> is the output of the neuron from <math>i</math> to <math>j</math>, and <math>G(N_{i,j})</math> is the set of neighbors of the neuron.
 
Although divergent cases are possible, the network should eventually converge, which occurs when no neuron changes its state from time <math>t</math> to <math>t+1</math>. When the network converges, either the network encodes a knight's tour or a series of two or more independent circuits within the same board.
 
=== Warnsdorff's rule ===
{{Chess diagram
| tright
|
|=
 
8 |  |  |  |  |  |  |  |  |=
7 |  |  |  |  |  |  |  |  |=
6 |x3|  |x7|  |  |  |  |  |=
5 |  |  |  |x7|  |  |  |  |=
4 |  |nl|  |  |  |  |  |  |=
3 |  |  |  |x7|  |  |  |  |=
2 |x2|  |x5|  |  |  |  |  |=
1 |  |  |  |  |  |  |  |  |=
    a  b  c  d  e  f  g  h
|A graphical representation of Warnsdorff's Rule. Each square contains an integer giving the number of moves that the knight could make from that square. In this case, the rule tells us to move to the square with the smallest integer in it, namely 2.
}}
 
Warnsdorff's rule is a [[heuristic]] for finding a knight's tour. We move the knight so that we always proceed to the square from which the knight will have the ''fewest'' onward moves. When calculating the number of onward moves for each candidate square, we do not count moves that revisit any square already visited. It is, of course, possible to have two or more choices for which the number of onward moves is equal; there are various methods for breaking such ties, including one devised by Pohl <ref name="pohl" /> and another by Squirrel and Cull.<ref>{{cite web|url=https://github.com/douglassquirrel/warnsdorff/blob/master/5_Squirrel96.pdf?raw=true |title=A Warnsdorff-Rule Algorithm for Knight's Tours on Square Boards |accessdate=2011-08-21 |last=Squirrel |first=Douglas |coauthors=Cull, P. |year=1996 }}</ref>
 
This rule may also more generally be applied to any graph. In graph-theoretic terms, each move is made to the adjacent vertex with the least [[degree (graph theory)|degree]]. Although the [[Hamiltonian path problem]] is [[NP-hard]] in general, on many graphs that occur in practice this heuristic is able to successfully locate a solution in [[linear time]].<ref name="pohl">{{cite journal|last = Pohl|first = Ira|title = A method for finding Hamilton paths and Knight's tours|journal = Communications of the ACM|volume = 10|issue = 7|date = July 1967|pages = 446–449|url =http://portal.acm.org/citation.cfm?id=363463|doi = 10.1145/363427.363463}}</ref> The knight's tour is a special case.<ref name="alwan-waters">{{cite conference| first=Karla |last=Alwan| coauthors=Waters, K.| title=Finding Re-entrant Knight's Tours on N-by-M Boards|conference=ACM Southeast Regional Conference| publisher=[[Association for Computing Machinery|ACM]]| location=New York, New York| pages=377–382| year=1992| url=http://portal.acm.org/citation.cfm?id=503806| format=[[PDF]]| accessdate=2008-10-28| doi = 10.1145/503720.503806}}</ref>
 
The [[heuristic]] was first described in "Des Rösselsprungs einfachste und allgemeinste Lösung" by H. C. von Warnsdorff in 1823.<ref name="alwan-waters" />
A computer program which solves the knight's tour for any starting position using Warnsdorff's rule can be found in the book 'Century/Acorn User Book of Computer Puzzles' edited by Simon Dally (ISBN 071260541X).
 
== See also ==
* [[Abu-Bakr Muhammad ben Yahya as-Suli]]
* [[George Koltanowski]]
* [[Longest uncrossed knight's path]]
* [[Eight queens puzzle]]
 
== Notes ==
{{reflist|colwidth=30em}}
 
== External links ==
{{Commons category|Knight's Tours}}
* [http://web.telia.com/~u85905224/knight/eWarnsd.htm Warnsdorff's Rule] and [http://web.telia.com/~u85905224/knight/bWarnsd.htm its efficiency] from Warnsdorff's Rule Web Page
* {{cite web
|first1=Dan
|last1=Thomasson
|url=http://www.borderschess.org/KnightTour.htm
|title= The knight's tour
}}
* [http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6651643&sortType%3Dasc_p_Sequence%26filter%3DAND%28p_IS_Number%3A6651625%29#! A Generalized Pseudo-Knight's Tour Algorithm for Encryption of an Image] by Anish Philip
* [http://www.mayhematics.com/t/t.htm Knight's tour notes]
* [http://www.kongregate.com/games/Exportgold/a-knights-tour Knight's Tour Flash Game]
* {{OEIS|A001230}}
* [http://warnsdorff.com warnsdorff.com] - Page devoted to Warnsdorff's Rule
* [http://faculty.olin.edu/~sadams/DM/ktpaper.pdf Knight's Tours] by Ben Hill and Kevin Tostado
*  {{cite web|last=Haran|first=Brady|title=Knight's Tour - Numberphile|url=http://www.youtube.com/watch?v=ab_dY3dZFHM|publisher=[[Brady Haran]]|accessdate=16 January 2014|format=video}}
 
=== Implementations ===
* [http://demonstrations.wolfram.com/TheKnightsTour/ The Knight's Tour] by Jay Warendorff, [[Wolfram Demonstrations Project]]
* {{cite web|first1=Piyush
|last1=Kumar
|url=http://www.compgeom.com/~piyush/teach/3330/homeworks/knightour.cpp
|title= A Simple backtracking implementation in C++
}}
* {{cite web
|first1=Kym
|last1=Horsell
|url=http://junk.kymhorsell.com/knight.html
|title=A Simple implementation in standard Prolog
}}
* [http://www.bringhurst.org/2013/03/04/a-simple-recursive-knights-tour-written-in-about-35-lines-of-python.html An implementation in Python]
* [http://www.knightstour.co.uk An implementation in C#]
* [http://dmitrybrant.com/knights-tour Knight's Tours Using a Neural Network] Program that creates tours using a neural network, plus gallery of images.
* [http://www.brainbashers.com/knight An interactive version in JavaScript]
* [http://www.breve.cz/jquery/jknight.php Knight's Tour in form of jQuery plugin]
* [https://play.google.com/store/apps/details?id=com.brodski.android.knightraid Knight Raid for OS Android]
* [http://equites.timepit.eu/ An implementation in Scala]
* [http://openlibrary.org/books/OL15157004M/Book_of_computer_puzzles/ An implementation in BBC BASIC]
 
 
[[Category:Graph algorithms]]
[[Category:Mathematical chess problems]]
[[Category:Chess problems]]
[[Category:Hamiltonian paths and cycles]]
[[Category:Mathematical problems]]

Revision as of 03:16, 13 February 2014


Direc - TV DVR by Tivo can be a revolutionary merchandise that merges the very best features of two outstanding products. The expense of these sorts of CCTV cameras depends on the lens found in it, the facilities you desire to get from it along with the brand that you desire to choose. Cctv dvr hdd file system On one other hand, when you desire top of the line, networked, security DVR software and systems, you will know what you should look for also.

In practice, most CCTV cameras simply record and archive footage continuously and the videos are only rolled out for viewing if the crime has been want committed inside the area. There are many cheap security camera starter kits available bundled with 2, 4 or 6 cameras plus a DVR within the package too.

Such ideas are certainly not "totally that random" because it still is relevant on the topic and concepts discussed prior on the assigned coursework. In this stage from the technical writing process cctv dvr software manufacturers you are going to determine which documents as well as other information that you just will use for best cctv dvr reviews your writing. cctv dvr pc cms software for our cctv dvr xeno cctv dvr As a business owner, speaker, consultant, trainer, cctv video camera manufacturers or any professional that markets their services, using a published cctv dvr recorder 8 channel best open source cctv dvr software book gives you a tremendous edge on your competition. These directories allow you to definitely reprint the content as long since the resource box is included in the end in the article.