...
 
Commits (2)
\begin{omgroup}{Introduction to Programming}
\mhinputref*{course/snip/progintro}
\mhinputref{programming/fragments/intro}
\mhinputref{python/en/python-genict}
\mhinputref{python/fragments/intro}
\mhinputref*{course/snip/progtrans}
\mhinputref{datastructures/fragments/intro}
......
\begin{module}[id=hardware-software-programming]
\begin{note}
\begin{omtext}
\begin{nomtext}
To understand programming, it is important to realize that that computers are universal
machines. Unlike a conventional tool -- e.g a spade -- which has a limited number of
purposes/behaviors -- digging holes in case of a spade, maybe hitting someone over the
head, a computer can be given arbitrary\footnote{as long as they are ``computable'', not
all are.} purposes/behaviors by specifying them in form of a ``program''.
\end{omtext}
\end{nomtext}
\begin{omtext}
\begin{nomtext}
This notion of a program as a behavior specification for an universal machine is so
powerful, that the field of computer science is centered around studying it -- and what
we can do with programs, this includes
......@@ -20,8 +19,7 @@
\item transforming, optimizing, and verifying other programs,
\item learning patterns in data and predicting the future from the past.
\end{enumerate}
\end{omtext}
\end{note}
\end{nomtext}
\begin{frame}
\frametitle{Computer Hardware/Software \& Programming}
......@@ -51,9 +49,9 @@
\begin{itemize}
\item
\begin{definition}[display=flow]
\defi{software} = data and programs
\defi{software} = \trefi{data} and \trefis{program}
\begin{itemize}
\item \defi{data} represents the world
\item \defi{data} represents objects and their relationshipes in the world
\item \defis{program} input, manipulate, output data
\end{itemize}
\end{definition}
......
\begin{module}[id=program-execution]
\importmhmodule[path=programming/en/hardware-software-programming]{hardware-software-programming}
\begin{note}
\begin{omtext}
\importmhmodule[path=programming/en/programming-languages]{programming-languages}
\begin{nomtext}
In computer science, we distinguish two levels on which we can talk about programs. The
more general is the level of \trefis{algorithm}, which is independent of the concrete
programming language. Algorithms express the general ideas and flow of computation and
can be realized in various languages, but are all equivalent -- in terms of the
algorithm they implement.
\end{omtext}
\end{nomtext}
\begin{omtext}
\begin{nomtext}
As they are not bound to programming languages \trefis{algorithm} transcend them, and we
can find them in our daily lives, e.g. as sequences of instructions like recipes, grame
instructions, and the like. This should make algorithms quite familiar; the only
difference of programs is that they are written down in an unambiguous syntax that a
computer can understand.
\end{omtext}
\end{note}
\end{nomtext}
\begin{frame}[fragile]
\frametitle{Program Execution}
......@@ -38,7 +36,7 @@
\item
\begin{example}[display=flow]
\usemhmodule[repos=MiKoMH/GenICT,path=python/en/forloop]{python-forloop}
\Trefi{program}: computer-processable version, e.g. in $\pythonLanguage$
\Trefi[programming-languages]{program}: computer-processable version, e.g. in $\pythonLanguage$
\begin{lstlisting}
for x in range(0, 3):
print ("we tell you",x,"time(s)")
......
\begin{module}[id=programming-languages]
\importmhmodule[path=programming/en/hardware-software-programming]{hardware-software-programming}
\begin{frame}
\frametitle{Programming Languages}
\begin{itemize}
\item The language in which we write the program \lec{express an alogrithm concretely}
\item
\begin{definition} A \defii{programming}{language} is the formal language in which we
write \trefis[hardware-software-programming]{program} \lec{express an alogrithm
concretely}
\end{definition}
\begin{itemize}
\item formal, symbolic, precise meaning \lec{a machine must understand it}
\end{itemize}
......
\begin{module}[id=tcs-nutshell]
\importmhmodule[path=programming/en/program-execution]{program-execution}
\begin{nomtext}
Finally, we want to go over a couple of general issues pertaining to programs and
(universal) machines. We will just go over them to get the intuitions -- which are
......@@ -11,35 +12,70 @@
\begin{itemize}
\item<1->
\begin{omtext}[title=Observation]
Computers are ``universal tools'', they can do anything given the right program
\Trefis[hardware-software-programming]{computer} are
\inlinedef{\defiis{universal}{tool}: their behavior is determined by a
\trefi[hardware-software-programming]{program}}; they can do anything, the
\trefi[hardware-software-programming]{program} specifies.
\end{omtext}
\item<1->
\begin{omtext}[title=Context]
Tools in most other disciplines (except in e.g. ribosomes in cell biology) are
specific to particular tasks.
Tools in most other disciplines are specific to particular tasks.\lec{except in
e.g. ribosomes in cell biology}
\end{omtext}
\item<2->
\begin{omtext}[title=Another Universal Tool]
The human mind \lec{We can understand/learn anything.}
\end{omtext}
\begin{assertion}[title=Deep Fundamental Result,type=remark,id=non-computability]
There are things no \trefi[hardware-software-programming]{computer} can compute.
\end{assertion}
\item<2->
\begin{omtext}[title=Strong Artificial Intelligence]
claims that the brain is just another computer
\end{omtext}
\begin{example}[id=ex.halting-problem,for=non-computability]
whether another \trefi[hardware-software-programming]{program} will terminate in
finite time.
\end{example}
\item<3->
\begin{omtext}[title=Deep Fundamental Result]
There are things a computer cannot compute, e.g. whether another program will
terminate.
\end{omtext}
\item<3->
\begin{omtext}[title=Church-Turing Hypothesis]
All programming languages are ``universal'': i.e. they can compute exactly the
same\lec{compilers/interpreters exist}
\end{omtext}
\begin{assertion}[type=remark,title=Church-Turing Hypothesis]
There are two classes of languages\inlinedef{
\begin{itemize}
\item \defii{Turing}{complete} (or
\defii[name=Turing-complete]{computationally}{universal}) ones that can compute
what is theoretically possible.
\item \defiis{data}{language} that cannot. \lec{but describe data sets}
\end{itemize}}
\end{assertion}
\item
\begin{assertion}[type=observation,title=Turing Equivalence]
All \trefiis[programming-languages]{programming}{language} are (made to be)
\atrefii{universal}{Turing}{complete}, so they can compute exactly the
same.\lec{\trefis[program-execution]{compiler}/\trefis[program-execution]{interpreter}
exist}
\end{assertion}
\item<3->
\begin{omtext}[title=\ldots in particular \ldots]
Everybody who tells you that one programming language is the best has no idea what
they're talking about\lec{though differences in efficiency, convenience, and beauty exist}
Everybody who tells you that one
\trefiis[programming-languages]{programming}{language} is the best has no idea what
they're talking about\lec{though differences in efficiency, convenience, and beauty
exist}
\end{omtext}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Artificial Intelligence}
\begin{itemize}
\item
\begin{omtext}[title=Another Universal Tool]
The human mind. \lec{We can understand/learn anything.}
\end{omtext}
\item
\begin{omtext}[title=Strong Artificial Intelligence]
claims that the brain is just another computer.
\end{omtext}
\item
\begin{omtext}[start=If that is true]
then
\begin{itemize}
\item the human mind underlies the same restrictions as computational machines
\item we may be able to find the ``mind-program''.
\end{itemize}
\end{omtext}
\end{itemize}
\end{frame}
......@@ -50,4 +86,6 @@
%%% TeX-master: t
%%% End:
% LocalWords: tcs-nutshell frametitle omtext ldots ldots
% LocalWords: tcs-nutshell frametitle omtext ldots ldots importmhmodule nomtext Trefis
% LocalWords: inlinedef defiis Result,type remark,id ex.halting-problem,for defii
% LocalWords: remark,title observation,tite trefiis atrefi
......@@ -4,7 +4,6 @@
\mhinputref{programming/en/programming-languages}
\mhinputref{programming/en/program-execution}
\mhinputref{programming/en/tcs-nutshell}
\mhinputref{python/en/python-genict}
\end{omgroup}
%%% Local Variables:
%%% mode: latex
......