PageRenderTime 47ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://github.com/exp04shy/oklibrary
C++ Header | 83 lines | 0 code | 1 blank | 82 comment | 0 complexity | 69a3e29bf73fc8e4c4375d26ad317040 MD5 | raw file
  1. // Oliver Kullmann, 16.11.2010 (Swansea)
  2. /* Copyright 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/VanderWaerden.hpp
  9. \brief Plans regarding generators for vdW-hypergraphs
  10. \todo palindromise_vdw_ohg
  11. <ul>
  12. <li> See OKlib::Combinatorics::Hypergraphs::Generators::Pd_arithprog_ohg
  13. for the C++ implementation. </li>
  14. <li> DONE
  15. Order of hyperedges:
  16. <ol>
  17. <li> Currently the order is directly derived from the colexicographical
  18. ordering on the original hyperedges. </li>
  19. <li> For example palindromise_vdw_ohg(arithprog_ohg(3,7)) =
  20. [[1,2,3,4],[{1,2,3},{2,3,4},{1,3},{3,4},{2,4},{1,4}]]. </li>
  21. <li> Perhaps colexicographical ordering would be better, which would be
  22. here [{1,3},{1,2,3},{1,4},{2,4},{3,4},{2,3,4}]. </li>
  23. <li> In ComputerAlgebra/Combinatorics/Lisp/Enumeration/Order.mac we have
  24. colex_lessp_l, however this functions needs to be generalised to handle
  25. lists of different lengths. </li>
  26. </ol>
  27. </li>
  28. <li> DONE
  29. Perhaps subsumption-elimination should be performed. For the above
  30. example we would get [{1,3},{1,4},{2,4},{3,4}]. </li>
  31. <li> Counting the number of hyperedges: a formula for the number of
  32. hyperedges should be developed. </li>
  33. </ul>
  34. \todo DONE (now the implementation is non-recursive, and in case more
  35. memory is needed, use default_memory_ecl())
  36. Hypergraphs of arithmetic progressions
  37. <ul>
  38. <li> The current implementation of arithprog_ohg/arithprog_hg can only
  39. handle small values of n --- otherwise we get a stack-size error!
  40. \verbatim
  41. C-STACK overflow at size 139456. Stack can probably be resized.
  42. \endverbatim
  43. (this on a 32-bit machine with 2GB memory). </li>
  44. <li> Perhaps this is due to Ecl --- can we grow the stack size?!
  45. <ol>
  46. <li> ulimit reports that there are no restrictions from the bash-side.
  47. </li>
  48. <li> There are various Ecl memory limits which are discussed in the
  49. manual -
  50. http://ecls.sourceforge.net/new-manual/re34.html#table.memory.limits .
  51. </li>
  52. <li> In this case the C-STACK is overflowing with a current limit of
  53. 128KB. This can be adjusted to say 1MB in the following way:
  54. \verbatim
  55. :lisp (ext:set-limit 'ext:c-stack 1048576)
  56. \endverbatim
  57. </li>
  58. <li> MG: Please make the documentation of Ecl
  59. available (locally), document all the memory option (apparently
  60. there are five: "frame-stack, binding-stack, c-stack, heap-size,
  61. lisp-stack"; they can also be set on the command line), together
  62. with appropriate values, and move this important documentation into its
  63. right (general) place. Likely the OKlibrary should provide meta-commands,
  64. which work for all Lisps supported; perhaps just asking for
  65. one argument, the amount of memory available for Maxima,
  66. and then calculating the approriate values.
  67. One also needs to find out how to pass command-line arguments to
  68. ecl (for example "--frame-stack 4096"). </li>
  69. <li> Compare "Reasonable memory and stack limits" in
  70. Buildsystem/MasterScript/SpecialProcessing/plans/Maxima_Init.hpp. </li>
  71. </ol>
  72. </li>
  73. <li> On the other hand, a non-recursive solution is also very easy to
  74. produce. </li>
  75. <li> However, such little problems shouldn't pose a problem! </li>
  76. </ul>
  77. */