Algorithms ROBERT SEDGEWICK | KEVIN WAYNE

Total Page:16

File Type:pdf, Size:1020Kb

Algorithms ROBERT SEDGEWICK | KEVIN WAYNE Algorithms ROBERT SEDGEWICK | KEVIN WAYNE 2.3 QUICKSORT ‣ quicksort ‣ selection Algorithms ‣ duplicate keys FOURTH EDITION ‣ system sorts ROBERT SEDGEWICK | KEVIN WAYNE http://algs4.cs.princeton.edu Two classic sorting algorithms: mergesort and quicksort Critical components in the world’s computational infrastructure. ・Full scientific understanding of their properties has enabled us to develop them into practical system sorts. ・Quicksort honored as one of top 10 algorithms of 20th century in science and engineering. Mergesort. [last lecture] ... Quicksort. [this lecture] ... 2 Quicksort t-shirt 3 2.3 QUICKSORT ‣ quicksort ‣ selection Algorithms ‣ duplicate keys ‣ system sorts ROBERT SEDGEWICK | KEVIN WAYNE http://algs4.cs.princeton.edu Quicksort overview Step 1. Shuffle the array. Step 2. Partition the array so that, for some j ・Entry a[j] is in place. ・No larger entry to the left of j. ・No smaller entry to the right of j. Step 3. Sort each subarray recursively. input Q U I C K S O R T E X A M P L E shufe K R A T E L E P U I M Q C X O S partitioning item partition E C A I E K L P U T M Q R X O S not greater not less sort left A C E E I K L P U T M Q R X O S sort right A C E E I K L M O P Q R S T U X result A C E E I K L M O P Q R S T U X Quicksort overview 5 number). 9.9 X 10 45 is used to represent infinity. Imaginary conunent I and J are output variables, and A is the array (with valuesTony of x may Hoarenot be negative and reM values of x may not be subscript bounds M:N) which is operated upon by this procedure. smaller than 1. Partition takes the value X of a random element of the array A, Values of Qd~'(x) may be calculated easily by hypergeometric and rearranges the values of the elements of the array in such a series if x is not too small nor (n - m) too large. Q~m(x) can be way that there exist integers I and J with the following properties : computed from an appropriate set of values of Pnm(X) if X is near M _-< J < I =< NprovidedM < N 1.0 or ix is near 0. Loss of significant digits occurs for x as small as A[R] =< XforM =< R _-< J 1.1 if n is largerInvented than 10. Loss of significant quicksort digits is a major diffi-to translateA[R] = RussianXforJ < R < I into English. culty・ in using finite polynomiM representations also if n is larger A[R] ~ Xfor I =< R ~ N than m. However, QLEG has been tested in regions of x and n The procedure uses an integer procedure random (M,N) which both large and[ butsmall; couldn't explain hischooses algorithmequiprobably a random integer or F implementbetween M and N, and it! ] procedure・ QLEG(m, nmax, x, ri, R, Q); value In, nmax, x, ri; also a procedure exchange, which exchanges the values of its two real In, mnax, x, ri; real array R, Q; parameters ; begin real t, i, n, q0, s; begin real X; integer F; ・n :=Learned 20; Algol 60 (and recursion).F := random (M,N); X := A[F]; if nmax > 13 then I:=M; J:=N; n := nmax +7; up: for I : = I step 1 until N do if Implementedri = 0then quicksort. if X < A [I] then go to down; ・ begin ifm = 0then I:=N; Q[0] := 0.5 X 10g((x + 1)/(x - 1)) down: forJ := J step --1 until M do else if A[J]<X then go to change; begin t := --1.0/sqrt(x X x-- 1); J:=M; q0 := 0; change: if I < J then begin exchange (A[IL A[J]); Tony Hoare Q[O] : = t; I := I+ 1;J:= J - 1; for i : = 1 step 1 until m do go to up 1980 Turing Award begin s := (x+x)X(i-1)Xt end 2: begin 4 × Q[0]+ (3i-i× i-2)× q0; else if [ < F then begin exchange (A[IL A[F]) i if c >= 0 then q0 := Q[0]; I:=I+l 3:begin Q[0] := s end end; end e:= aXe;f := bXd;goto8 if x = 1 then else if F < J tllen begin exchange (A[F], A[J]) ; end 3 ; Q[0] := 9.9 I" 45; J:=J-1 e:=bXc; R[n + 1] := x - sqrt(x X x - 1); end ; ifd ~ 0then for i := n step --1 until 1 do end partition 4: begin R[i] := (i + m)/((i + i + 1) X x f:=bXd; goto8 +(m-i- 1) X R[i+l]); end 4; ALGORITHM 61 go to the end; f:=aXd; goto8 if m = 0 then ALGORITHMPROCEDURES 64FOR RANGE ARITHMETIC 5: end 2; begin if x < 0.5 tben QUICKSORTALLAN GIBB* ifb > 0 then Q[0] := arctan(x) - 1.5707963 else C.University A. R. HOARE of Alberta, Calgary, Alberta, Canada 6: begin Q[0] := - aretan(1/x)end else Elliottbegin Brothers Ltd., Borehamwood, Hertfordshire, Eng. if d > 0 then begin t := 1/sqrt(x X x + 1); begin procedure RANGESUM (a, b, c, d, e, f); q0 := 0; procedure quicksort (A,M,N); value M,N; e := MIN(a X d, b X c); real a,b,c,d,e,f; q[0] := t; array A; integer M,N; f:= MAX(a X c,b X d); go to8 comment The term "range number" was used by P. S. Dwyer, for i : = 2 step 1 until m do comment Quicksort is a very fast and convenient method of end 6; Linear Computations (Wiley, 1951). Machine procedures for begin s := (x + x) X (i -- 1) X t X Q[0I sorting an array in the random-access store of a computer. The e:= bX c; f := aX c; go to8 range arithmetic were developed about 1958 by Ramon Moore, +(3i+iX i -- 2) × q0; entire contents of the store may be sorted, since no extra space is end 5; "Automatic Error Analysis in Digital Computation," LMSD qO := Q[0]; required. The average number of comparisons made is 2(M--N) In f:=aXc; Report 48421, 28 Jan. 1959, Lockheed Missiles and Space Divi- Q[0] := s end end; (N--M), and the average nmnber of exchanges is one sixth this if d _-< O then sion, Palo Alto, California, 59 pp. If a _< x -< b and c ~ y ~ d, R[n + 1] := x - sqrt(x × x + 1); amount. Suitable refinements of this method will be desirable for 7: begin then RANGESUM yields an interval [e, f] such that e =< (x + y) for i := n step - 1 until 1 do its implementation on any actual computer; e:=bXd; goto8 f. Because of machine operation (truncation or rounding) the R[i] := (i + m)/((i -- m + 1) × R[i + 1] begin integer 1,J ; end 7 ; machine sums a -4- c and b -4- d may not provide safe end-points --(i+i+ 1) X x); if M < N then begin partition (A,M,N,I,J); e:=aXd; of the output interval. Thus RANGESUM requires a non-local for i : = 1 step 2 until nmax do quicksort (A,M,J) ; 8: e := ADJUSTPROD (e, -1); real procedure ADJUSTSUM which will compensate for the Rill := -- Rill; quicksort (A, I, N) f := ADJUSTPROD (f, 1) machine arithmetic. The body of ADJUSTSUM will be de- the: for i : = 1 step 1 until nnmx do end end RANGEMPY; pendent upon the type of machine for which it is written and so Q[i] := Q[i - 1] X R[i] end quieksort procedure RANGEDVD (a, b, c, d, e, f) ; is not given here. (An example, however, appears below.) It end QLEG; real a, b, c, d, e, f; is assumed that ADJUSTSUM has as parameters real v and w, comment If the range divisor includes zero the program * This procedure was developed in part under the sponsorship and integer i, and is accompanied by a non-local real procedure exists to a non-local label "zerodvsr". RANGEDVD assumes a of the Air Force Cambridge Research Center. CORRECTION which gives an upper bound to the magnitude CommunicationsALGORITHM 65 of the ACM (July 1961) non-local real procedure ADJUSTQUOT which is analogous of the error involved in the machine representation of a number. FIND (possibly identical) to ADJUSTPROD; The output ADJUSTSUM provides the left end-point of the 6 begin C.output A. R. interval HOARE of RANGESUM when ADJUSTSUM is called ALGORITHM 63 if c =< 0 A d ~ 0 then go to zer0dvsr; Elliottwith i Brothers= --1, and Ltd., the right Borehamwood, end-point when Hertfordshire, called with i Eng.= 1 if c < 0 then PARTITION The procedures RANGESUB, RANGEMPY, and RANGEDVD procedure find (A,M,N,K); value M,N,K; C. A. R. HOARE provide for the remaining fundamental operations in range 1: begin array A; integer M,N,K; ifb > 0 then Elliott Brothers Ltd., Borehamwood, Hertfordshire, Eng. arithmetic. RANGESQR gives an interval within which the comment Find will assign to A [K] the value which it would 2: begin square of a range nmnber must lie. RNGSUMC, RNGSUBC, procedure partition (A,M,N,I,J); value M,N; have if the array A [M:N] had been sorted. The array A will be e := b/d; go to3 RNGMPYC and RNGDVDC provide for range arithmetic with array A; integer M,N,1,J; partly sorted, and subsequent entries will be faster than the first; end 2; complex range arguments, i.e.
Recommended publications
  • Tarjan Transcript Final with Timestamps
    A.M. Turing Award Oral History Interview with Robert (Bob) Endre Tarjan by Roy Levin San Mateo, California July 12, 2017 Levin: My name is Roy Levin. Today is July 12th, 2017, and I’m in San Mateo, California at the home of Robert Tarjan, where I’ll be interviewing him for the ACM Turing Award Winners project. Good afternoon, Bob, and thanks for spending the time to talk to me today. Tarjan: You’re welcome. Levin: I’d like to start by talking about your early technical interests and where they came from. When do you first recall being interested in what we might call technical things? Tarjan: Well, the first thing I would say in that direction is my mom took me to the public library in Pomona, where I grew up, which opened up a huge world to me. I started reading science fiction books and stories. Originally, I wanted to be the first person on Mars, that was what I was thinking, and I got interested in astronomy, started reading a lot of science stuff. I got to junior high school and I had an amazing math teacher. His name was Mr. Wall. I had him two years, in the eighth and ninth grade. He was teaching the New Math to us before there was such a thing as “New Math.” He taught us Peano’s axioms and things like that. It was a wonderful thing for a kid like me who was really excited about science and mathematics and so on. The other thing that happened was I discovered Scientific American in the public library and started reading Martin Gardner’s columns on mathematical games and was completely fascinated.
    [Show full text]
  • Single-To-Multi-Theorem Transformations for Non-Interactive Statistical Zero-Knowledge
    Single-to-Multi-Theorem Transformations for Non-Interactive Statistical Zero-Knowledge Marc Fischlin Felix Rohrbach Cryptoplexity, Technische Universität Darmstadt, Germany www.cryptoplexity.de [email protected] [email protected] Abstract. Non-interactive zero-knowledge proofs or arguments allow a prover to show validity of a statement without further interaction. For non-trivial statements such protocols require a setup assumption in form of a common random or reference string (CRS). Generally, the CRS can only be used for one statement (single-theorem zero-knowledge) such that a fresh CRS would need to be generated for each proof. Fortunately, Feige, Lapidot and Shamir (FOCS 1990) presented a transformation for any non-interactive zero-knowledge proof system that allows the CRS to be reused any polynomial number of times (multi-theorem zero-knowledge). This FLS transformation, however, is only known to work for either computational zero-knowledge or requires a structured, non-uniform common reference string. In this paper we present FLS-like transformations that work for non-interactive statistical zero-knowledge arguments in the common random string model. They allow to go from single-theorem to multi-theorem zero-knowledge and also preserve soundness, for both properties in the adaptive and non-adaptive case. Our first transformation is based on the general assumption that one-way permutations exist, while our second transformation uses lattice-based assumptions. Additionally, we define different possible soundness notions for non-interactive arguments and discuss their relationships. Keywords. Non-interactive arguments, statistical zero-knowledge, soundness, transformation, one-way permutation, lattices, dual-mode commitments 1 Introduction In a non-interactive proof for a language L the prover P shows validity of some theorem x ∈ L via a proof π based on a common string crs chosen by some external setup procedure.
    [Show full text]
  • 1 Introduction
    Logic Activities in Europ e y Yuri Gurevich Intro duction During Fall thanks to ONR I had an opp ortunity to visit a fair numb er of West Eu rop ean centers of logic research I tried to learn more ab out logic investigations and appli cations in Europ e with the hop e that my exp erience may b e useful to American researchers This rep ort is concerned only with logic activities related to computer science and Europ e here means usually Western Europ e one can learn only so much in one semester The idea of such a visit may seem ridiculous to some The mo dern world is quickly growing into a global village There is plenty of communication b etween Europ e and the US Many Europ ean researchers visit the US and many American researchers visit Europ e Neither Americans nor Europ eans make secret of their logic research Quite the opp osite is true They advertise their research From ESPRIT rep orts the Bulletin of Europ ean Asso ciation for Theoretical Computer Science the Newsletter of Europ ean Asso ciation for Computer Science Logics publications of Europ ean Foundation for Logic Language and Information publications of particular Europ ean universities etc one can get a go o d idea of what is going on in Europ e and who is doing what Some Europ ean colleagues asked me jokingly if I was on a reconnaissance mission Well sometimes a cow wants to suckle more than the calf wants to suck a Hebrew proverb It is amazing however how dierent computer science is esp ecially theoretical com puter science in Europ e and the US American theoretical
    [Show full text]
  • Introduction to Computer System
    Chapter 1 INTRODUCTION TO COMPUTER SYSTEM 1.0 Objectives 1.1 Introduction –Computer? 1.2 Evolution of Computers 1.3 Classification of Computers 1.4 Applications of Computers 1.5 Advantages and Disadvantages of Computers 1.6 Similarities Difference between computer and Human 1.7 A Computer System 1.8 Components of a Computer System 1.9 Summary 1.10 Check your Progress - Answers 1.11 Questions for Self – Study 1.12 Suggested Readings 1.0 OBJECTIVES After studying this chapter you will be able to: Learn the concept of a system in general and the computer system in specific. Learn and understand how the computers have evolved dramatically within a very short span, from very huge machines of the past, to very compact designs of the present with tremendous advances in technology. Understand the general classifications of computers. Study computer applications. Understand the typical characteristics of computers which are speed, accuracy, efficiency, storage capacity, versatility. Understand limitations of the computer. Discuss the similarities and differences between the human and the computer. Understand the Component of the computer. 1.1 INTRODUCTION- Computer Today, almost all of us in the world make use of computers in one way or the other. It finds applications in various fields of engineering, medicine, commercial, research and others. Not only in these sophisticated areas, but also in our daily lives, computers have become indispensable. They are present everywhere, in all the dev ices that we use daily like cars, games, washing machines, microwaves etc. and in day to day computations like banking, reservations, electronic mails, internet and many more.
    [Show full text]
  • The Strange Birth and Long Life of Unix - IEEE Spectrum Page 1 of 6
    The Strange Birth and Long Life of Unix - IEEE Spectrum Page 1 of 6 COMPUTING / SOFTWARE FEATURE The Strange Birth and Long Life of Unix The classic operating system turns 40, and its progeny abound By WARREN TOOMEY / DECEMBER 2011 They say that when one door closes on you, another opens. People generally offer this bit of wisdom just to lend some solace after a misfortune. But sometimes it's actually true. It certainly was for Ken Thompson and the late Dennis Ritchie, two of the greats of 20th-century information technology, when they created the Unix operating system, now considered one of the most inspiring and influential pieces of software ever written. A door had slammed shut for Thompson and Ritchie in March of 1969, when their employer, the American Telephone & Telegraph Co., withdrew from a collaborative project with the Photo: Alcatel-Lucent Massachusetts Institute of KEY FIGURES: Ken Thompson [seated] types as Dennis Ritchie looks on in 1972, shortly Technology and General Electric after they and their Bell Labs colleagues invented Unix. to create an interactive time- sharing system called Multics, which stood for "Multiplexed Information and Computing Service." Time-sharing, a technique that lets multiple people use a single computer simultaneously, had been invented only a decade earlier. Multics was to combine time-sharing with other technological advances of the era, allowing users to phone a computer from remote terminals and then read e -mail, edit documents, run calculations, and so forth. It was to be a great leap forward from the way computers were mostly being used, with people tediously preparing and submitting batch jobs on punch cards to be run one by one.
    [Show full text]
  • The Strange Birth and Long Life of Unix - IEEE Spectrum
    The Strange Birth and Long Life of Unix - IEEE Spectrum http://spectrum.ieee.org/computing/software/the-strange-birth-and-long-li... COMPUTING / SOFTWARE FEATURE The Strange Birth and Long Life of Unix The classic operating system turns 40, and its progeny abound By WARREN TOOMEY / DECEMBER 2011 They say that when one door closes on you, another opens. People generally offer this bit of wisdom just to lend some solace after a misfortune. But sometimes it's actually true. It certainly was for Ken Thompson and the late Dennis Ritchie, two of the greats of 20th-century information technology, when they created the Unix operating system, now considered one of the most inspiring and influential pieces of software ever written. A door had slammed shut for Thompson and Ritchie in March of 1969, when their employer, the American Telephone & Telegraph Co., withdrew from a collaborative project with the Photo: Alcatel-Lucent Massachusetts Institute of KEY FIGURES: Ken Thompson [seated] types as Dennis Ritchie looks on in 1972, shortly Technology and General Electric after they and their Bell Labs colleagues invented Unix. to create an interactive time-sharing system called Multics, which stood for "Multiplexed Information and Computing Service." Time-sharing, a technique that lets multiple people use a single computer simultaneously, had been invented only a decade earlier. Multics was to combine time-sharing with other technological advances of the era, allowing users to phone a computer from remote terminals and then read e-mail, edit documents, run calculations, and so forth. It was to be a great leap forward from the way computers were mostly being used, with people tediously preparing and submitting batch jobs on punch cards to be run one by one.
    [Show full text]
  • Jeremiah Blocki
    Jeremiah Blocki Current Position (August 2016 to present) Phone: (765) 494-9432 Assistant Professor Office: 1165 Lawson Computer Science Building Computer Science Department Email: [email protected] Purdue University Homepage: https://www.cs.purdue.edu/people/faculty/jblocki/ West Lafayette, IN 47907 Previous Positions (August 2015 - June 2016) (May 2015-August 2015) (June 2014-May 2015) Post-Doctoral Researcher Cryptography Research Fellow Post-Doctoral Fellow Microsoft Research Simons Institute Computer Science Department New England Lab (Summer of Cryptography) Carnegie Mellon University Cambridge, MA UC Berkeley Pittsburgh, PA 15213 Berkeley, CA Education Ph.D. in Computer Science, Carnegie Mellon University, 2014. Advisors: Manuel Blum and Anupam Datta. Committee: Manuel Blum, Anupam Datta, Luis Von Ahn, Ron Rivest Thesis Title: Usable Human Authentication: A Quantitative Treatment B.S. in Computer Science, Carnegie Mellon University, 2009. (3.92 GPA). Senior Research Thesis: Direct Zero-Knowledge Proofs Allen Newell Award for Excellence in Undergraduate Research Research Research Interests Passwords, Usable and Secure Password Management, Human Computable Cryptography, Password Hash- ing, Memory Hard Functions, Differential Privacy, Game Theory and Security Journal Publications 1. Blocki, J., Gandikota, V., Grigorescu, G. and Zhou, S. Relaxed Locally Correctable Codes in Computa- tionally Bounded Channels. IEEE Transactions on Information Theory, 2021. [https://ieeexplore. ieee.org/document/9417090] 2. Harsha, B., Morton, R., Blocki, J., Springer, J. and Dark, M. Bicycle Attacks Consider Harmful: Quantifying the Damage of Widespread Password Length Leakage. Computers & Security, Volume 100, 2021. [https://doi.org/10.1016/j.cose.2020.102068] 3. Chong, I., Proctor, R., Li, N. and Blocki, J. Surviving in the Digital Environment: Does Survival Processing Provide and Additional Memory Benefit to Password Generation Strategies.
    [Show full text]
  • Squinting at Power Series
    Squinting at Power Series M. Douglas McIlroy AT&T Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT Data streams are an ideal vehicle for handling power series. Stream implementations can be read off directly from simple recursive equations that de®ne operations such as multiplication, substitution, exponentiation, and reversion of series. The bookkeeping that bedevils these algorithms when they are expressed in traditional languages is completely hidden when they are expressed in stream terms. Communicating processes are the key to the simplicity of the algorithms. Working versions are presented in newsqueak, the language of Pike's ``squint'' system; their effectiveness depends critically on the stream protocol. Series and streams Power series are natural objects for stream processing. Pertinent computations are neatly describable by recursive equations. CSP (communicating sequential process) languages1, 2 are good vehicles for implementation. This paper develops the algorithmic ideas and reduces them to practice in a working CSP language,3 not coincidentally illustrating the utility of concurrent programming notions in untangling the logic of some intricate computations on sequences. This elegant approach to power series computation, ®rst demonstrated but never published by Kahn and MacQueen as an application of their data stream system, is still little known.4 Power series are represented as streams of coef®cients, the exponents being given implicitly by ordinal position. (This is an in®nite analogue of the familiar representation of a polynomial as an array of coef®cients.) Thus the power series for the exponential function ∞ 1 1 1 e x = Σ x n / n! = 1 + x + __ x 2 + __ x 3 + ___ x 4 + .
    [Show full text]
  • Uma Introdução À Computação: História E Ciência Editora Ixtlan - São Paulo – 2016
    São Paulo – 2016 Copyright © Autores diversos Projeto gráfico: Editora Ixtlan Revisão: Eduardo Telmo Fonseca Santos Milena Montenegro Pereira Diagramação: Márcia Todeschini Capa: Gabriel Polizello Uma introdução à computação: história e ciência Editora Ixtlan - São Paulo – 2016 ISBN: 978-85-8197-510-8 1.Ciência da computação 2.história CDD 000 Editora Ixtlan - CNPJ 11.042.574/0001-49 - I.E. 456166992117 [email protected] – www.editoraixtlan.com DIREITOS PRESERVADOS – É proibida a reprodução total ou parcial, de qualquer forma ou por qualquer meio. A violação dos direitos de autor (Lei Federal 9.610/1998) é crime previsto no art. 184 do Código Penal. Sumário 1. Início da computação - 3 2. Software - 19 3. Representação da Informação - 27 4. Ciência da Computação é Ciência? - 35 5. Rede de Computadores - 37 6. Exercícios Complementares - 49 7. Bibliografia - 53 Cap´ıtulo 1 Início da computação Para entender os fundamentos da computação atual é preciso olhar para o passado e ver como essa disciplina/área foi fundada e como vem se desenvolvendo até a atualidade [5]. Uma das bases da computação é a Matemática. Desde os primórdios o ser humano percebeu a necessidade de desenvolver algo para auxiliá-lo nas mais diversas operações. Essa necessidade é a responsável pelo surgimento desde as máquinas de calcular até as mais diversas máquinas utilizadas no mundo todo. Em torno de 2600 anos a.C., surgiu um dos primeiros instrumentos manuais voltados para ajudar o homem a calcular quantias numéricas. Esse instrumento usado para representação dos números era o ábaco chinês, que apesar do tempo em que surgiu, ainda é comumente utilizado em certas localidades.
    [Show full text]
  • Universidad Nacional Autónoma De México, Por Permitirme El Honor De Formar Parte De Ella
    Universidad Nacional Autónoma de México FACULTAD DE INGENIERÍA “SISTEMA DE MONITOREO DE SERVIDORES UNIX” T E S I S Que para obtener el Título de: INGENIERO EN COMPUTACIÓN P r e s e n t a: EDGAR CRISTÓBAL RAMÍREZ MIRANDA Director de Tesis: Ing. Noé Cruz Marín Agradecimientos Más que gracias, mi eterno amor a mi padre, mi madre y a mis hermanos a los cuales les debo lo que soy. Papá te admiro y respeto profundamente por la rectitud y honradez con la que te conduces a cada paso de tu vida, por el apoyo y dirección que siempre de ti he recibido, por todas las enseñanzas que desde chico recibí de ti y espero seguir recibiendo. Mamá te amo por todos los años de dedicación que me has dado, por los desvelos, por las lágrimas, por los cariños, por tu inmensa ternura y compasión, por que no encuentro ni encontraré jamás la forma de pagarte todo lo que me has dado, gracias. A mi hermano Emilio por ser mi amigo, por enseñarme a defenderme, por ser mi ídolo, por ensañarme a no desistir nunca hasta alcanzar las metas, porque a tu lado siempre me sentí protegido, por alentarme a ser ingeniero. A mi hermano Joaquín, por que de ti aprendí a ser más sereno a pensar antes de actuar, por siempre protegerme de todos sin importarte nada, por estar conmigo en las buenas y en las malas, por tu tolerancia, por ser mi amigo en los tiempos difíciles. Gracias por aguantarme, soportarme, cuidarme y quererme de la forma en la que lo hacen, estoy y siempre estaré orgulloso de pertenecer a la familia Ramírez Miranda.
    [Show full text]
  • Lezione 11 Processi Sistemi Operativi (9 CFU), Cdl Informatica, A
    Lezione 11 Processi Sistemi Operativi (9 CFU), CdL Informatica, A. A. ! !" ! 1 Dipartimento di Scienze Fisic$e, Informatic$e e %atematic$e Universit& di %odena e Re((io )mi*ia $ttp+"",e-*a-.in(..nimo.it"peop*e"andreo*ini"didattica"sistemi/operativi 1 0.ote of t$e da1 (%editate, (ente, meditate...) “This is the UNIX philosophy: write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a niversal inter"ace.# #o.(*as McI*ro1 (192 -) %atematico, In(e(nere, Programmatore Inventore de**e pipe e de**e utilit1 U3I4 2 SOLUZIONI DEGLI ESERCIZI 3 Esercizio 1 (1 min.) 0.al 5 il PID del processo init (il (estore dei servizi U3I4)6 4 Identi7cazione esatta con pidof Il PID del processo init p.8 essere individ.ato a partire dal s.o nome esatto con i* comando pidof+ pidof init Si dovre--e ottenere il PID 1. 5 Esercizio 2 (2 min.) I processi del des9top :;3OM)< iniziano con la strin(a :(nome<. Come si possono individ.are i processi del des9top in esec.zione6 6 Individuazione tramite pgrep I processi de**=am-iente des9top ;3OME possono essere individ.ati cercando *=espressione re(olare ^gnome.*$ con il comando pgrep+ pgrep ^gnome.*$ Per stampare anc$e i nomi dei comandi si .sa *=opzione -l+ pgrep -l ^gnome.*$ 7 Esercizio 3 (2 min.) Elencate t.tti i processi (e relativi PID) ese(.iti per conto del vostro .sername. Le((ete la pa(ina di man.ale del comando opportuno per capire come fare.
    [Show full text]
  • Leonard (Len) Max Adleman 2002 Recipient of the ACM Turing Award Interviewed by Hugh Williams August 18, 2016
    Leonard (Len) Max Adleman 2002 Recipient of the ACM Turing Award Interviewed by Hugh Williams August 18, 2016 HW: = Hugh Williams (Interviewer) LA = Len Adelman (ACM Turing Award Recipient) ?? = inaudible (with timestamp) or [ ] for phonetic HW: My name is Hugh Williams. It is the 18th day of August in 2016 and I’m here in the Lincoln Room of the Law Library at the University of Southern California. I’m here to interview Len Adleman for the Turing Award winners’ project. Hello, Len. LA: Hugh. HW: I’m going to ask you a series of questions about your life. They’ll be divided up roughly into about three parts – your early life, your accomplishments, and some reminiscing that you might like to do with regard to that. Let me begin with your early life and ask you to tell me a bit about your ancestors, where they came from, what they did, say up to the time you were born. LA: Up to the time I was born? HW: Yes, right. LA: Okay. What I know about my ancestors is that my father’s father was born somewhere in modern-day Belarus, the Minsk area, and was Jewish, came to the United States probably in the 1890s. My father was born in 1919 in New Jersey. He grew up in the Depression, hopped freight trains across the country, and came to California. And my mother is sort of an unknown. The only thing we know about my mother’s ancestry is a birth certificate, because my mother was born in 1919 and she was an orphan, and it’s not clear that she ever met her parents.
    [Show full text]