jedbarlow / cmput495

495 Presentation
0 stars 0 forks source link

Things for Intro and Other Stuff. #4

Open Chobbes opened 10 years ago

Chobbes commented 10 years ago

So, there are some things that I think we should explain at the beginning of the presentation in order for the Monad part to make sense -- Jed can comment if they disagree or have anything to add.

Additionally, some people have been concerned that we're not "applied enough". Which I think is silly because this is CS and we should be able to talk about Monads and Category Theory all we damn well please! They're hot topics!

I think the best way to deal with this is to, in our introduction, really emphasize the applications of functional programming in natural science and engineering applications. Some of the main benefits are going to be conciseness, and code correctness. You want to make sure your results are correct, especially if you're running a long simulation and having to throw out the results could mean months of work and significant costs for a researcher. Then we are essentially talking about functional programming as a means of solving natural science problems in a nicer way -- but also the problems that arise that we need Monads for. Ultimately our presentation can be "okay, we want to use functional programming to solve natural science problems because it's really nice and mathy and rad... But the advantages like referential transparency are also very problematic for these things because we can't do I/O etc...."

I'm going to relate my examples to some "real world" applications. For those that don't know I am going to use the list monad to simply generate all possible tic tac toe games and show how many games 'x' wins, how many games 'o' wins, and how many games are draws. For starters this relates to some of the research done by Dr. Schaeffer in 2002, but it also relates to other problems... For instance a lot of networking protocols involve random arbitration and essentially resemble two player games like tic tac toe. When I was working with such a protocol I wanted to know what the probability of reaching any given state of the system was, so I used a very similar construction to the tic tac toe game to calculate this. It's useful for proofs by exhaustion.

My second example is a monte carlo algorithm for approximating pi. While this particular example may not be very applicable to natural sciences / engineering monte carlo algorithms are extremely important to both fields -- in fact nearly every presentation we have in CMPUT 495 revolves around using monte carlo simulations to solve some problem (or there is one within the presentation at least). Monads are vital for performing monte carlo simulations in a language like Haskell.

Sound good?

Chobbes commented 10 years ago

Oh, also we can talk about distributed computing / parallelization. Pure functions are a huge advantage for these things as well, and these things are important for a lot of applications. Using parallelism with a simulation can greatly increase the speed that it runs.