this post was submitted on 22 Aug 2023
221 points (97.0% liked)

memes

10310 readers
2111 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to [email protected]

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/AdsNo advertisements or spam. This is an instance rule and the only way to live.

Sister communities

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 1 year ago* (last edited 1 year ago)

You know this would be a great programming problem for CS students. Given the phrase "head less horse man", generate all 4-word phrases, repeated words allowed. (Some of the ones in this picture aren't 4 words, but anyways...)

Consider the words "head less horse man" to be digits in a base-4 number system; head=0 less=1 horse=2 man=3. Counting from 0 to (4^4)-1 would yield 256 unique values,

  • head head head head = 0
  • head head head less = 1
  • head head head horse = 2
  • head head head man = 3
  • head head less head = 10 (4 base 10)
  • ..
  • man man man man = (4^4)-1 = 3333 (255 base 10)

Bonus points for funniest picture to go with a value (must be hand-drawn by student, no AI allowed) :)

EDIT: not permutations, which I originally said. It's more of an exercise in understanding how to count in bases other than 10.