The reference to Kobayashi Maru is from Star Trek. It is a war game scenario that was used to test how Starfleet cadets deal with a no-win scenario. The first and only cadet to pass the scenario was the future Captain James Tiberius Kirk - he only passed by reprogramming the test because he did not believe any scenario could be unwinnable. So, similar to the test being given to the characters in this episode, the only way to pass was to cheat.
Penny calls Quentin a, 'Hobbit-loving freak'. Hobbits are beings that exist in English writer J. R. R. Tolkien's fantasy work, which became the Lord of the Rings franchise. Mackenzie Astin who appears later in the show, is the real-life half-brother of Sean Astin, who played Hobbit Samwise Gamgee in the movie franchise.