1. History of Computing http://www.vigneras.name/pierre Dr. Pierre Vignéras This work is licensed under a Creative Commons Attribution-Share Alike 2.0 France. See http://creativecommons.org/licenses/by-sa/2.0/fr/ for details
2. Text Books Books Reference Book: New Perspectives On Computer Concepts Parsons and Oja National Book Foundation The Web: http://wikipedia.org C- How to program (Third Edition) Introduction C++ and Java Deitel & Deitel Prentice Hall
123. New type of technology will replace current integrated-circuit technology, and that Moore's Law will hold true long after 2020. II. History/Hardware
150. Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Only one initial state! Only one terminal state! Only one initial state!
151.
152. Example: f(x)=x+2 II. History/Theory 1,>> 0,1 0,>> 1,<< 1,>> 0,1 0,>> 1,<< Relabel states Make the new link
153.
154.
155. Turing Machines are the actual formalisation of what is called algorithms II. History/Theory
156.
157. Instructions are usually listed explicitly starting 'from the top' and going 'down to the bottom': this is what is formally called the flow of control . II. History/Theory
158.
159.
160.
161.
162.
163.
164. Look at each of the remaining items in the list and if it is larger than the largest item so far, make a note of its rank.
174. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L m ax Loop Condition Assignment Output II. History/Theory Condition : two forms If (boolean expression) expression_if_true If (boolean expression) { expression_if_true }else{ expression_if_false }
184. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory PRINT “Hello” If (person has a PhD) PRINT “Dr.” PRINT name PRINT “Hello” If (person is a male) { PRINT “Mr.” }else{ PRINT “Mrs.” } PRINT name Execution for Dr.Pierre: “Hello Dr. Pierre” Execution for Mrs. Bhutto “Hello Mrs. Bhutto” Indentation and brackets are very important!
185. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output II. History/Theory Loop : many forms For (variable in “a finite set of values”) expression While (boolean expression) expression Do { expression } while (boolean expression) In all forms, you have a stop condition
186.
187.
188. Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output II. History/Theory Input/Output : many forms Input from keyboard, mice, file, network, parameters Output to screen, file, network, printer, returned values
189. Input/Output: Bad example Avoid interactions II. History/Theory PRINT “Size of the list?” READ size FROM KEYBOARD for ( all i such that 0<i<size) { L i = a random number } max = 0 for (all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT L max ON SCREEN Algorithm Interactions List construction
190. Input/Output: Functions f(x) = 3x+2 g(M) = M' such that if M(x,y), M'(0,y) II. History/Theory Name Input Output Name Input Output Type of Input and Output! Guessed usually! Same thing in Pseudo-code!
193. output (max?) Function calls Name Input Output Unrelated variables Variables are only visible inside their enclosing block delimited by brackets
194. max = 0 for ( all i such that 0<i<|L|) { if ( L max < L i ) max = i } PRINT m ax Loop Condition Assignment Output Algorithm Example: largest number Pseudo-code (http://en.wikipedia.org/wiki/Pseudo-code) II. History/Theory Index is returned, not the actual value! Example: 31415 Value Printed is 4
195. Yes No Yes No Algorithm Example: largest number Flowchart (http://en.wikipedia.org/wiki/Flow_chart) II. History/Theory Should be explicit here! index = 0 max = index index < |L| ? L max < L index ? max = index index = index + 1 Start End return max Example: 27182 Largest: 3
196. Flowcharts – Common Symbols Symbol Name Terminal Process Flow-line Decision Input/Output Function Beginning or end of a program Flow of logic Calculation or data manipulation Comparison, Question, Decision that determines alternative paths to be followed Input or Output of data II. History/Theory
197. II. History/Theory Algorithm Example: largest number C-code (http://en.wikibooks.org/wiki/Computer_programming) int largest_index(numbers[] t, int n) { int i = 0; int max = i; for (i = 0; i < n; i++) { if (t[max] < t[i]) max = i; } return max; } Data Type List represented as an array Abbreviations: i++ means i = i +1 Statements end with a semi-colon
198.
199.
200. So, given a string of characters, can we prove it is the actual representation of a TM?
201. Given a TM and a string, can we prove that the given string represents the given TM? II. History/Theory
213. The problem itself is distinct from the methods used to solve it, called algorithms.
214. A decision problem which can be solved by some algorithm is called decidable .
215.
216.
217.
218.
219.
220. g(x,y)=x-y --> x. ( y . x-y)= x y . x-y; g(3,2)=1--> ( x y . x-y)) 3 2 = ( y . 3-y) 2 = 3-2 = 1
221. g(f(1),f(0)) = f(1)-f(0) = (1+2)-(0+2) = 3+2 = 5 --> ( x y . x-y) (( x. x+2) 1) (( x. x+2) 0) Returns a number Returns a function II. History/Theory
222.
223. This equivalence of lambda expressions can not be decided by an algorithm in general
224. Consider: ( x. x x) ( x. x x) --> No reduction!
225. Logic and predicates TRUE := xy. x, FALSE := xy. y AND := pq. p q FALSE, OR := pq. p TRUE q NOT := p. p FALSE TRUE, IFTHENELSE := pxy. p x y II. History/Theory
226.
227.
228. II. History/Theory Functionnal language Example (http://en.wikibooks.org/wiki/Computer_programming) (defun f (n) (if (< n 2) 1 (* n (f (- n 1))) ) ) Only functions Prefix notation Recursive call Inferred!
229.
230.
231.
232.
233. Computer science community regards it as the first and still the best comprehensive treatment of its subject.
234. Bill Gates: "If you think you're a really good programmer... read (Knuth's) book...You should ... send me a resume if you can read the whole thing." II. History/Theory
239. A Complexity Class is the set of all of the problems which can be solved using a certain amount of a certain computational resource. II. History/Theory
240.
241. Alternative algorithm may require less time but more space (or vice versa) to solve a given problem.
242.
243. Sequential time gives a limit to how far the computation can be parallelized. Some steps must be done sequentially because they depend on the results of previous steps. II. History/Theory
445. File System Issue Example: External Fragmentation (http://en.wikipedia.org/wiki/Fragmentation_(computer)) Remove C,E After many operations (Create, Remove): Leads to performance problem: reading the red file requires 4 movements. Hard Drives are 1,000,000 times slower than CPU! II. History/OS A B C D F E A B D F Create: G = G 1 G 2 + A B G 1 D F G 2
446.
447.
448. Works very well when the free space available is above 20% II. History/OS
463. 1940 George Stibitz used a teletype machine to send instructions from Dartmouth College in New Hampshire to his Complex Number Calculator in New York
464. 1960-1970 Kleinrock, Baran and Davies had independently conceptualized and developed network systems consisting of datagrams or packets that could be used in a packet switching network between computer systems. II. History/Network
465.
466. Special type of computers will take care of the packet switching on the behalf of end-users one (big mainframe at that time) II. History/Network
483. The Growth of Internet The Exponential Growth started thanks to the WWW II. History/Network
484.
485.
486.
487.
488.
489. Web Browsers War (http://en.wikipedia.org/wiki/Browser_wars) II. History/Network
490.
491. Even if until IE v4.0, Netscape was by far superior, Microsoft was enlarging its market share automatically after each OS installation! II. History/Network
492.
493. Microsoft decided to provide for “free” IIS (Web Server) with server version of Windows
524. Layers at work Abstraction: Communication from process to process Implementation: Communication from layer to layer II. History/Network
525. Layers at work Example: UDP Application Layer Transport Layer Network Layer Link Layer II. History/Network UDP Data UDP Header IP Data IP Header Frame Header Frame Trailer Frame Data