tag:blogger.com,1999:blog-5195188167565410449.post4305409184519031168..comments2016-09-19T07:11:19.884+01:00Comments on Haskell for Maths: Conjugacy classes, part 2DavidAhttp://www.blogger.com/profile/16359932006803389458noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5195188167565410449.post-82315161171803708712009-10-20T20:54:39.752+01:002009-10-20T20:54:39.752+01:00scheman: This is just convention. When we're l...scheman: This is just convention. When we're labelling the vertices of a graph with integers, we usually start from 1. However, with the cube (q 3), the natural labelling is with 3-tuples from {0,1}. This is q' 3 in the code. We can convert this to an integer labelling by interpreting the 3-tuples as binary numbers - ie [0,0,0] = 0, [0,0,1] = 1, [0,1,0] = 2, etc. Thus we define q 3 = fromBinary (q' 3). HaskellForMaths gives you great flexibility over vertex labellings. For example, the Petersen graph can be labelled with the 2-subsets of [1..5], eg [1,5], [2,4]. But using the fromDigits function, we can instead have the vertices labelled as 15, 24, etcDavidAhttps://www.blogger.com/profile/16359932006803389458noreply@blogger.comtag:blogger.com,1999:blog-5195188167565410449.post-28016821134561046882009-10-18T10:03:15.503+01:002009-10-18T10:03:15.503+01:00why first vector index in c, k and kb is 1 and 0 i...why first vector index in c, k and kb is 1 and 0 in q ?schemanhttps://www.blogger.com/profile/12181709786187295956noreply@blogger.com