PageRenderTime 25ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/ComputerAlgebra/Hypergraphs/Lisp/Generators/plans/general.hpp

https://github.com/MNikolic/oklibrary
C++ Header | 177 lines | 0 code | 2 blank | 175 comment | 0 complexity | a7611fb2a39c8a574200a1d8b5820019 MD5 | raw file
  1. // Oliver Kullmann, 19.7.2008 (Swansea)
  2. /* Copyright 2008, 2009, 2010 Oliver Kullmann
  3. This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
  4. it and/or modify it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation and included in this library; either version 3 of the
  6. License, or any later version. */
  7. /*!
  8. \file ComputerAlgebra/Hypergraphs/Lisp/Generators/plans/general.hpp
  9. \brief Plans regarding generators for hypergraphs
  10. \bug ramseyrv_ohg handles r=0 incorrectly
  11. <ul>
  12. <li> ramseyrv_ohg(0,0,0) should return [[rv()],[{rv()}]], not
  13. [[rv()],[{{}}]]. </li>
  14. </ul>
  15. \todo Connections
  16. <ul>
  17. <li> Finally all the generators provided here are also to be provided at
  18. C++ level in module Combinatorics/Hypergraphs/Generators; see
  19. Combinatorics/Hypergraphs/Generators/plans/general.hpp. </li>
  20. </ul>
  21. \todo Organisation
  22. <ul>
  23. <li> The current Generators/Generators.mac needs to be split into several
  24. files:
  25. <ol>
  26. <li> Basics.mac </li>
  27. <li> VanderWaerden.mac </li>
  28. <li> GreenTao.mac : DONE </li>
  29. <li> Schur.mac </li>
  30. <li> Rado.mac DONE </li>
  31. <li> Folkman.mac </li>
  32. <li> Hindman.mac DONE </li>
  33. <li> Ramsey.mac </li>
  34. </ol>
  35. </li>
  36. </ul>
  37. \todo Statistics
  38. <ul>
  39. <li> For all generated hypergraphs we need accompanying
  40. statistic-functions. </li>
  41. <li> As for clause-set statistics. </li>
  42. </ul>
  43. \todo Hypergraphs of arithmetic progressions
  44. <ul>
  45. <li> The current implementation of arithprog_ohg/arithprog_hg can only
  46. handle small values of n --- otherwise we get a stack-size error!
  47. \verbatim
  48. C-STACK overflow at size 139456. Stack can probably be resized.
  49. \endverbatim
  50. (this on a 32-bit machine with 2GB memory). </li>
  51. <li> Perhaps this is due to Ecl --- can we grow the stack size?!
  52. <ol>
  53. <li> ulimit reports that there are no restrictions from the bash-side.
  54. </li>
  55. <li> There are various Ecl memory limits which are discussed in the
  56. manual -
  57. http://ecls.sourceforge.net/new-manual/re34.html#table.memory.limits .
  58. </li>
  59. <li> In this case the C-STACK is overflowing with a current limit of
  60. 128KB. This can be adjusted to say 1MB in the following way:
  61. \verbatim
  62. :lisp (ext:set-limit 'ext:c-stack 1048576)
  63. \endverbatim
  64. </li>
  65. <li> MG: Please make the documentation of Ecl
  66. available (locally), document all the memory option (apparently
  67. there are five: "frame-stack, binding-stack, c-stack, heap-size,
  68. lisp-stack"; they can also be set on the command line), together
  69. with appropriate values, and move this important documentation into its
  70. right (general) place. Likely the OKlibrary should provide meta-commands,
  71. which work for all Lisps supported; perhaps just asking for
  72. one argument, the amount of memory available for Maxima,
  73. and then calculating the approriate values.
  74. One also needs to find out how to pass command-line arguments to
  75. ecl (for example "--frame-stack 4096"). </li>
  76. <li> Compare "Reasonable memory and stack limits" in
  77. Buildsystem/MasterScript/SpecialProcessing/plans/Maxima_Init.hpp. </li>
  78. </ol>
  79. </li>
  80. <li> On the other hand, a non-recursive solution is also very easy to
  81. produce. </li>
  82. <li> However, such little problems shouldn't pose a problem! </li>
  83. </ul>
  84. \todo Sudoku
  85. <ul>
  86. <li> Create Sudoku-hypergraphs (such that the Sudoku-problems can be
  87. expressed as strong colouring problems). </li>
  88. <li> For box dimension p the vertex set should be {1,...,p}^2. </li>
  89. <li> The 3N hyperedges (N=p^2) just correspond to the rows, columns
  90. and boxes (the hypergraph is thus N-uniform). </li>
  91. </ul>
  92. \todo %Ramsey hypergraphs
  93. <ul>
  94. <li> We should always have that standardisation should not change the
  95. order of vertices or hyperedges, however this seems to be the case here?
  96. </li>
  97. <li> Perhaps we should use complete_hg and variations. </li>
  98. <li> Compare with ComputerAlgebra/Hypergraphs/Lisp/Generators/GreenTao.mac
  99. (so that we arrive at a certain standardisation of generator-facilities).
  100. </li>
  101. <li> One needs to revise the extreme cases; compare "Ramsey problems"
  102. in ComputerAlgebra/Satisfiability/Lisp/Generators/RamseyTheory/plans/RamseyProblems.hpp.
  103. </li>
  104. <li> Providing a standardised vertex set:
  105. <ol>
  106. <li> DONE
  107. We only need to consider lexicographical ordering of the
  108. vertex names. Actually, in order to preserve monotonicity, we better
  109. use colexicographical ordering. </li>
  110. <li> This standardised hypergraph has then a canonical order-preserving
  111. isomorphism to ramsey_ohg(q,r,n).
  112. <ol>
  113. <li> For this to hold (for the vertices) we needed ramsey_ohg
  114. to use colexicographical ordering. </li>
  115. <li> Perhaps this is a sensible thing to do; however it seems
  116. we don't need to do something on the hyperedges (i.e., we continue
  117. to use lexicographical order there). </li>
  118. <li> Currently we use the lexicographical order of ramsey_ohg on
  119. vertex set and hyperedge set, but using colexicographical ranking. </li>
  120. <li> This has the advantage that ramsey_ohg is easy to compute and
  121. isomorphic to ramsey_stdohg. </li>
  122. <li> But for n' >= n we don't have that ramsey_stdohg(q,r,n') is
  123. an extension of ramsey_stdohg(q,r,n) --- we only have that
  124. ramsey_stdhg(q,r,n) is a subhypergraph of ramsey_stdhg(q,r,n'). </li>
  125. </ol>
  126. </li>
  127. <li> The same numbering should also be used in the C++ generator
  128. (see Ramsey.cpp). </li>
  129. <li> So that we can easily create additional clauses with Maxima,
  130. added then to the C++-generated files. </li>
  131. </ol>
  132. </li>
  133. <li> Accompanying statistics are needed.
  134. <ol>
  135. <li> See okltest_ramsey_hg for the formula for the number of
  136. hyperedges. </li>
  137. <li> Likely only basic statistics should be computed, while for example
  138. the size of the automorphism group etc. is handled in module.
  139. RamseyTheory/Lisp/Ramsey. </li>
  140. </ol>
  141. </li>
  142. </ul>
  143. \todo Generalised %Ramsey hypergraphs
  144. <ul>
  145. <li> We can define %Ramsey hypergraphs for arbitrary hypergraphs G
  146. (ramsey_hg uses the complete r-graph).
  147. <ol>
  148. <li> The vertices are the hyperedges of G. </li>
  149. <li> Hyperedges are sets of hyperedges of G which are the hyperedge-set
  150. of a complete q-graph. </li>
  151. <li> If G is a graph, then we are considering the hypergraph of
  152. "cliques", restricted to cliques of size q, and where the clique
  153. is viewed as a collection of edges. </li>
  154. <li> We need to check whether this is the common point of view. </li>
  155. </ol>
  156. </li>
  157. </ul>
  158. */