On Thu, Jul 30, 2009 at 10:31 AM, Jason Grout <jason-s...@creativetrax.com>wrote:
> > Rob Beezer wrote: > > On Jul 30, 10:04 am, William Stein <wst...@gmail.com> wrote: > >> What did he say? I've only seen him speak on the History Channel > >> (seriously). > > > > LOL. Topic is now graph codes, not Bible Codes. > > > > I think graph7 would be worse since then we'd have 7 bits to a > > character and more bad characters. Maybe graph5? But seriously, how > > about a standard like Base-64, which would still pack 6 bits to the > > byte while using letters, numerals and + and /? I think this is what > > PGP and GPG use for ASCII versions of binary objects. First paragraph > > at link seems to say it all: > > > > http://en.wikipedia.org/wiki/Base64 > > > > I think using the established international "standard" of Base64 is a > good option to convert to. It should be easy to write a function that > gives this "sage6" format of the graph. It would probably make sense to > follow the other conventions of graph6/sparse6 (i.e., edge traversal > order, etc.) This would be trivial to implement if we just base64 encode/decode the existing graph6 string. Then, as illustrated below, the nauty graph6 string ":I`ASWCaG`WaJC{afP" that started this message just becomes the nice sage6 string "SXBRSlpIQEhX". sage: h=Graph(":I`ASWCaG`WaJC{afP") sage: h Looped multi-graph on 10 vertices sage: import base64 sage: base64.b64encode(h.graph6_string()) 'SXBRSlpIQEhX' sage: Graph(base64.b64decode('SXBRSlpIQEhX')) Graph on 10 vertices The only problem I see is that one may want to do: Graph('SXBRSlpIQEhX') but that could be ambiguous in some rare cases when the string is *both* a sage6 and graph6 string. Does that ever happen? (Maybe no.) -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---