Showing posts with label computer science. Show all posts
Showing posts with label computer science. Show all posts

Sunday, May 5, 2024

Jokes about algorithms

 I ask students to write me a joke about algorithms pretty regularly. I like seeing what they come up with...

  • What did one cross-country star algorithm say to the other?
    "It's run time."
  • Teacher: Write me an algorithm that runs in constant time.
    Student: Ok, the first part of my algorithm iterates over a list...
  • What's the runtime of log?
    Nothing. Logs can't run.
  • When in doubt, O(n!).
  • What did the polynomial function say to the exponential function to get it to go away?
    "Beeg-O(n)!" [joke included a visual of an xy graph of poly and exp functions diverging with speech bubbles]
  • "Knock knock"
    "Who's there?"
    "The Gale-Shapley Algorithm"
    "That joke wasn't funny"
    "I guess you aren't a good match for my humor!"
  • Two engineers are stuck on whether to use BFS or DFS for a problem.
    Eng 1: Should we use BFS instead? Because we tried DFS and we're stuck?
    Eng 2: The real queue is why did I choose this career?
  • A 1-day-old great dane talking to a 1-day-old toy poodle
    poodle: I'm bigger than you haha!
    great dane: I"m not worried I am Ω(you)
  • Knock knock... Boom bruteforce algorithm

Algorithms puns:

  • Dancer to Algorithms: "Wow algo! You really have rithm!"
  • Why did Lila hate the orchestra concert?
    Because they didn't have any algo-rhythm!
  • What did Lila play on the drums?
    An algo-rhythm
  • What type of music do computer scientists listen to?
    Algo-rhythm-ic Music
  • Mr. Merge, Mr. Selection, and Ms. Bubble all joined the Annual Sorting Dance Competition. Can you guess who won?
    Mr. Merge won! How? Because he had the best sorting algo-rhythm :)!
  • If my name was algo and I did music they'd call me algo-rhythm!
Regarding graphs:
  • What's the bakery's favorite algorithm?
    "Bread"th first search
  • BreadFirstSearch, no rice no pasta!
  • How do we know that topsort vertices prefer the heat?
    They have to leave once they reach 0 in-degrees.
  • What did Dijkstra say to Kruskal?
    Why you so greedy
  • What kind of search do you prefer?
    DFS, I like my algorithms with a little more depth to them. * badum tzzzz *
  • What did BFS say to DFS? Nothing. Algorithms can't talk.
  • Why did the edge cross the cut?
    Since it had to provide the shortest path :(

This post's theme word is capacitate (v tr), "to make capable." Studying computer science does not capacitate one for comedy.

Thursday, May 2, 2024

If you created an algorithm, what would you call it?

 I take attendance by having the students answer a question.

If you created an algorithm, what would you call it?

Most people went for a legacy:

  • [student's own first name]sort
  • [student's own first name]algorithm
  • [student's own last name]
  • [student's own full name]3000
  • [student's last name] method
  • [student's last name]'s Algorithm
  • Make[student's first name]OnTime

Then some people went for a bizarre name:

  • golden
  • Goat
  • BifghkaJKHSTY
  • cheeseburger
  • transform 
  • apples

Then some people went for a straightforward "impossible to say what this algorithm does":

  • The Best Algorithm
  • Algorithm
  • Algo I
  • Algorithm X

My favorite was the "extremely possible to say what this algorithm does":

  • something descriptive


This post's theme word is maecenatism (n), "patronage". None of today's forward-thinking algorithm designers has favored maecenatism in their naming scheme; how is modern-day artisanal algorithm design to thrive without this historical source of support?

Saturday, December 23, 2023

Final exam

The exam was printed in color. Partly this was to make the diagrams pretty, partly this was as a hint that students should be thinking about colors. Adjacent to some colored text, a student wrote "LOVED THIS HINT, THANK YOU!" which is a very positive piece of exam-writing feedback to me. In a proof for this problem, another student wrote "The hint of coloring the 4 houses the different colors further solidifies [claim they were making]."

Down the margins of the final, one student entered a philosophical reverie: "What is 'correct'? Can approx algs ever even get there"

When asked to give an example, one student wrote "I can't fight the urge to say ∅". This was, in fact, a correct example.

I offered students the opportunity to write a joke. I am not sure these all make sense?

  • Solving NP-complete algorithms is like finding a CS prof that doesn't wear khakis. Theoretically possible, but in practice it's too hard.
  • The biggest dream for an NPC is to become P(layable).
  • Why did the NP-complete problem become a therapist?
    It thought it had a lot of experience with unsolvable isues.
  • "That's NPC behavior."
    Normal person interpretation: someone is acting funky like a Non-Player Character.
    Theoretical Computer Scientist interpretation: How did they figure out how to live non-deterministically?
  • Why buy cereal from the NP-hard aisle of NP store?
    It's part of an NP-complete breakfast.
  • I went to the doctor for my (N)ose (P)ain Problem. He took way too long to find a solution.
  • This joke is NP-complete, reducible to everyone else's, hard to understand, and has a polytime verifier. Verifier: print("HAHAHAHAHAHA")
  • Why did NP not cross the road?
    Because it wasn't efficient to do so.
  • What did NP-complete say to NP-hard?
    Don't worry, your polynomial time is coming!
  • What did Vertex Cover say to Independent Set?
    You NP-complete me <3
  • Why did the NP-complete problem go to the party?
    It thought it would be a clique-free environment.
  • Once NP-complete is verified on tiktok, it has its own verifier.
  • A: Did you hear Neal Patrick Harris found his long lost brother, of the same name, Neil Patrick Harris?
    B: Oh wow, how nice!
    A: I know, right! They said now that they found each other, they both feel Neil Patrick-complete!
  • Why was Lila late for the CS41 final (theoretically)?
    Because she was stuck in traffic and navigating it was NP-complete!
  • Teacher: Prove this problem is NP-complete.
    Student: I just "completed" a solution, so it must be NP-complete.
  • Q: What do you call a math-inspired, environmentally-minded tap-dancing group?"
    A: "Al Gore Rhythms: An Inconvenient Troupe"
  • Q: Why did the programmer break up with NP-completeness?
    A: Because NP-completeness took too long to solve their relationship problems; she wasn't efficient enough.
  • It is verifiable that I will complete my homeworks for ALGO but it can not be done in polynomial time. ALGO TO SCHEDULE ALGO Homework is NP-complete.
  • Why did the algorithms problem not talk?
    It was NPC(omplete).
    idk if this makes sense, i don't play video games

I take issue with
  • P=NP only if N=1
And indeed, another (more pedantic) student wrote:
  • P=NP
    (N-1)P = 0
    N=1 or P=0

I was offered some non-jokes:
  • I like to imagine that all of the NP-complete problems are friends with one another, because they can't feel complete without being reducible to one another.
  • I am Not Proud of this exam, but it is Completed.
  • I'm NP-complete with this test.
  • Ironic for it to be NP-complete but we don't know if P=NP.
  • I wish you were NP-complete so that all of our problems could be reduced to you.
  • I can decide in polynomial time whether a graph is 3-colorable.
That last student is powerful in a troubling way.

When prompted, "Write a joke about NP-completeness." the most wry student in the class wrote:
  • I would tell you one, but once you've heard one you've heard them all.
  • I would write a joke about NP-completeness, but once you've heard one you've hard them all!
  • I once heard an NP-complete joke but once you've heard one, you've heard them all.
  • My verifier could assess a good joke if it saw one, but I don't think this problem can be done in deterministic polynomial time. :)

This post's theme word is lexiphanic (adj), "using pretentious words and language." Very few students attempted lexiphanic answers to test questions.

Monday, June 26, 2023

SIROCCO 2023

Some quotes from SIROCCO 2023, a CS conference earlier this month.

"Everything's computation. Any process evolving and solving problems over time is computation." - Yuval Emek. An expression of the "computation is a metaphor for everything" that I hadn't heard framed this way before.

"Artificial neural nets use all kinds of swanky functions." - Frederik Mallman-Trenn

"... so first we need to understand what a human is. I'm oversimplifying a lot, but a human has a head and a body..." - Frederik Mallman-Trenn taking the physicists' approach to framing a problem

"This is the tapas version of the talk... I'm going to be going over a lot of topics to give you a taste of them." - Joshua Daymude

"There's so many dimensions here that we have not yet found one algorithm to rule them all." - Joshua Daymude, expressing an unscripted pervasiveness of Tolkien in popular culture

"This is a crowd that lies proofs, so I don't want to show off my simulations and offend anybody." - Joshua Daymude

"Roger is going to be talking about 'swarm intelligence', if that even exists." - Andréa Richa, introducing the next speaker's talk about swarm intelligence with a devastating level of objectivity

"I don't know how to solve this and I'm afraid to go back and tell them this, so you should help me! I want to hear your ideas." - Roger Wattenhofer, with an earnest appeal to the crowd that I can only imagine comes from unassailable tenure-granted confidence and seniority

[many inscrutable self-notes about the legibility of different presenters' slides, diagrams, and presentation styles]

The mildest possible theory praise: "I think you're touching upon the challenges of this area." - Michael Schapira

"Deep learning is voodoo. We can't debug it, we don't know how it works..." - Michael Schapira

"How do I know in real time that my decisions are no longer sound?" - Michael Schapira, expressing a CS question but also a question which suits intoxicated people

"The nice thing about this algorithm is... but the very horrible thing is, it uses infinite memory." - Bernadette Charron-Bost, expressing a truly beautiful "theory person has found a tradeoff" provable fact

The phrase "we need to use more elbow oil" was mentioned and my brain took a minute to figure out that the non-native English-speaking presenter probably meant the idiom "elbow grease", which on further inspection is a bizarre and faintly disgusting idiom.

Discussing the topic of algorithmic recommendation systems: "It's maybe something questionable from the moral point of view. But it's certainly interesting and I will not talk about it." - Boaz Patt-Shamir


This post's theme word is: craic (n), "good times involving pleasant company, enjoyable conversation, etc." Many speakers reminded us that SIROCCO is the 'fun' conference and is full of craic and jollity.