Above: view of the round keep at Dinefwr and the Tywi valley from the northern chamber block. Below right: the modern entrance to the castle viewed from the edge tripartite thesis the outer ward. Even at first glimpse, it is clear that the long ridge occupied by Dinefwr and the rocky knoll on which Dryslwyn sits perched are positions of the most extraordinary defensive strength. But suggestions that prehistoric fortifications possibly underlie the medieval castles are not borne out by any evidence.
Gradually over a period of more than 20 years Rhys re-established a single power over the lands of Ystrad Tywi, Ceredigion, and parts of Dyfed, and thereby brought a large part of the ancient kingdom under his control. He captured the castle at Cardigan and probably rebuilt the castles of Llandovery, Rhayader, and Nevern. His remarkable achievement in reversing the fortune of his kingship cannot be underestimated. Following the death of Rhys ap Gruffydd in 1197, his sons contested the succession to the kingdom of Deheubarth. It seems unlikely that so eminent a personage as the Lord Rhys would not have wished to embellish and strengthen his principal stronghold, especially since he is known to have rebuilt the castle at Cardigan, and possibly that at Nevern, in stone. Perhaps it was Rhys who constructed the first masonry wall at Dinefwr, possibly with a now lost stone tower.
Also, two large and three small buildings were erected in the bailey. Thereafter additions were probably few, though we have frequent records of the poor state of repair of different sections of the castle, as such in 1343 and 1353 when the great keep was reported to be the verge of collapse. After the Glyndwr siege, new building and repairs were apparently undertaken, and it may have been this period that the crenellated south wall on the entrance passage was totally rebuilt to butt up against the south turret. The castle was transformed in the late 17th century when the top of the keep was rebuilt to form a summerhouse.
The southern turret was also equipped with a roof and a tiled floor, and the castle became the focus for summer visits and picnics. The earthworks surrounding the castle were altered somewhat to allow easier access from the Newton House. By the late 18th century, however, both roofs had been destroyed by fire and the castle was largely abandoned to nature. Hamiltonian cycle is to undertake an exhaustive search.
Hamilton paths and circuits in a graph using deductions that greatly reduce backtracking and guesswork. Hamiltonian cycles on various classes of graphs. Probabilistic Algorithms for Hamiltonian Circuits and Matchings. A Fast Algorithm for Finding Hamilton Cycles. Winnipeg, Manitoba, Canada: University of Manitoba, 2008. Mathematical Games: About the Remarkable Similarity between the Icosian Game and the Towers of Hanoi. The Sixth Book of Mathematical Games from Scientific American.