Recent content by jza

  1. J

    MHB Create a multiplication table program

    This is a simple problem to test your understanding of 2D arrays. You could approach it in the standard way, like this (porting the code from Python to C++ is left as an exercise to the reader ;) ): def multi_table_(n): A = [[0 for i in xrange(0, n)] for j in xrange(0,n)] for i in...
  2. J

    MHB Apply Depth-first Search Algorithm Example

    The book's solution is alphabetical, i.e. starts at node "A" and then proceeds to "B". Yours went from "A" to "G". I don't think it really matters? It shouldn't if you've got the principle of it. I glanced at your code and it looks fine to me.
  3. J

    MHB How Does Group Theory Apply to Solving a Rubik's Cube?

    Does anyone know what this guy is on about? I understand some of the basics of group theory and I know there's a connection between Galois theory and the solving of a Rubik's cube, but I'm not sure what law he is even trying to disprove here. I'm assuming something with regards to symmetry or...
  4. J

    MHB Graph two colours, no monochromatic path.

    Let v_0 v_1 ... v_k be a path of maximum length in a graph G. Then all neighbours of v_0 lie on the path. Since \deg (v_0) \geq \delta (G), we have k \geq \delta (G) and the path has at least length \delta (G).
Back
Top