Intro to Computational Thinking and Data Science 3



Comment

Optimization Problems 일반적으로 최적화 문제는 크게 두 파트로 구성된다. An objective funciton that is to be maximized or minimized A set of constraint (possibly empty) that must be honored 최적화 문제의 예로는 Shortest path Traveling salesman Bin packaing Sequence alignment Knapsack 이런 알려진 문제들을 공부함으로써 problem reduction 을 이용할 수…

Read this article

하스켈로 배우는 함수형 언어 7



Comment

the countdown problem 은 프랑스 퀴즈 프로그램에서 유래한 문제입니다. 주어진 양수를 단 한번씩만 이용하여 특정 숫자를 만드는 문제입니다. 사용가능한 연산자는 +, *, -, / 입니다. 예를 들어 (25 - 10) * (50 + 1) = 765 입니다. 사람이 풀기엔 search space 가 좀 넓어서 답을 한번에 찾기 어렵지만, 컴퓨터는 무한한 인내심을 가지고 있기 때문에 풀기에 적합한…

Read this article

하스켈로 배우는 함수형 언어 6



Comment

이번시간엔 어떻게 type 과 class 를 정의하는지 배울겁니다. 이렇게 commonality 를 추출해서 type 과 class 로 만듦으로써 작업의 양을 줄일 수 있습니다. 이 과정을 추상화라 부르기도 합니다. 마지막엔 이제까지 배운바를 적용해 봅시다. 항상 참인 명제를 검사하는 tautology checker 와 평가 시점을 조절하는 abstract machine 을 만들어 보겠습니다. Type Declarations 하스켈에선…

Read this article

Intro to Computational Thinking and Data Science 2



Comment

Computational systems are so very convenient for modeling behaviors of noisier, uncertain systems, especially in estimating the values of parameters of those systems. Monte Carlo Simulation Monte Carlo simulation is a method of estimating the value of an unknown quantity using the principles of inferential statistics 이전에 잠깐 deterministic model…

Read this article

하스켈로 배우는 함수형 언어 5



Comment

키보드를 읽거나 화면에 무엇인가 쓰는 intertactive program 은 side-effect 를 만듭니다. 그런데, 하스켈은 side-effect 가 없지요. 그럼 입출력이 불가능한 것일까요? 당연히 그렇지 않습니다. IO 모나드 를 사용할겁니다. pure expression 부분과 side-effect 를 만들어내는 impure action 을 구분하여 하스켈에서 입출력을 할 수 있습니다. Interactive program can be written in Haskell using…

Read this article