{"id":16733138,"url":"https://github.com/quchen/geb-miu-puzzle","last_synced_at":"2026-01-02T19:05:02.943Z","repository":{"id":66327254,"uuid":"14720710","full_name":"quchen/geb-miu-puzzle","owner":"quchen","description":"Visualize the GEB MIU puzzle using Haskell and GraphViz","archived":false,"fork":false,"pushed_at":"2014-02-20T23:55:23.000Z","size":42208,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T09:09:21.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"DOT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-26T15:29:45.000Z","updated_at":"2019-01-26T17:05:11.000Z","dependencies_parsed_at":"2023-02-20T02:30:56.447Z","dependency_job_id":null,"html_url":"https://github.com/quchen/geb-miu-puzzle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quchen%2Fgeb-miu-puzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quchen%2Fgeb-miu-puzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quchen%2Fgeb-miu-puzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quchen%2Fgeb-miu-puzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quchen","download_url":"https://codeload.github.com/quchen/geb-miu-puzzle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243784101,"owners_count":20347409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:48:48.016Z","updated_at":"2026-01-02T19:05:02.892Z","avatar_url":"https://github.com/quchen.png","language":"DOT","funding_links":[],"categories":[],"sub_categories":[],"readme":"GEB MIU-puzzle graphs\n=====================\n\n(Initially written around the end of 2012.)\n\n![(Picture missing, uh oh)](out/miu8.png)\n\nThe problem\n-----------\n\nIn Douglas Hofstadter's book *Gödel, Escher, Bach*, the reader is presented the following puzzle:\n\nThere are words consisting of the letters `M`, `I` and `U`. A word can be transformed into another word using one of four rules:\n\n1. When there is `UU` somewhere in the word, it can be deleted. For example `MIUUIUU` can be transformed to `MIIUU` by deleting the first `UU`, or to `MIUUI` by deleting the second `UU`.\n\n2. A `U` can be appended to a word whenever it ends in `I`. `MUI` becomes `MUIU` under this rule.\n\n3. `III` can be replaced by `U`, for example `MIIIUI` becomes `MUUI`.\n\n4. When a word begins with an `M`, everything that follows can be duplicated. For example `MUI` becomes `MUIUI`, or `MIIIIUU` becomes `MIIIIUUIIIIUU`.\n\nWhen there are multple rules that can be applied at the same time, one of them can be chosen arbitrarily.\n\nThe puzzle is to start with the word `MI`, and to try to find a series of applications of the above rules to transform this word to `MU`.\n\n\nThe program\n-----------\n\nWhat the program does is simply taking a word, and producing the set of all possible words that can follow from this word in one step. It then does this procedure recursively, keeping track of how each word can be reached. The whole thing is aggregated into a graph showing all the correspondences, with the colour of the arrows indicating the applied rule.\n\nThe generated graphs, `miu*.png`, picture these graphs when all words and rules up to a certain length have been tried. Therefore, `miu8.png` will only show words up to length 8. (You'll notice that the longest word here is only 7 long though - that's because in order to create a 8-long word, you have to produce longer intermediate ones.)\n\nThe program is significantly faster than actually plotting its output, so it was not optimized any further.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquchen%2Fgeb-miu-puzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquchen%2Fgeb-miu-puzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquchen%2Fgeb-miu-puzzle/lists"}