Computer Science Distilled Learn the Art of Solving Computational Problems by Wladston Ferreira Filh

This preview shows page 1 - 6 out of 39 pages.

COMPUTERSCIENCEDISTILLEDLEARNTHE ARTOF SOLVING COMPUTATIONALPROBLEMSWLADSTON FERREIRA FILHOCOMPUTERSCIENCEI ILL12A1401KANDHLBIN11.GE
WILLUn
...AB".WS19..ALLANERinovwFULL-VirusINELEVERBO3
11.4---------MADETTEEHK5707COMPUTERSCIENCEI ILLWLADSTON FERREIRA FILHOLasVegas©2017 Wladston Viana Ferreira FilhoAll rights reserved.Edited by Raimondo Pictet.Published byCODE ENERGY LLC[email protected]http //code.energyhttp //twitter.com/code_energy±http//facebook.com/code.energyS Jones Blvd # Las Vegas NVNo part of this publication may be reproduced, stored in a re- trieval system or transmitted in any form or by any means, electronic,mechanical, photocopying, recording or other- wise, without permission from the publisher, except for brief quotations embodied inarticles or reviews.While every precaution has been taken in the preparation of this book, the publisher and the author assume no responsi- bility forerrors or omissions, or for damages resulting from the use of the information contained herein.Publisher’s Cataloging-in-Publication DataFerreira Filho, Wladston.Computer science distilled: learn the art of solving computationalproblems / Wladston Viana Ferreira Filho. — 1st ed.x, 168 p. : il.ISBN 978-0-9973160-0-1eISBN 978-0-9973160-1-81. Computer algorithms. 2. Computer programming. 3. Computerscience. 4. Data structures (Computer science). I. Title.004 – dc22 2016909247First Edition, February 2017.
Friends are the family we choose for ourselves. This book is dedicated to my friends Rômulo, Léo, Moto andChris, who kept pushing me to “finish the damn book already”.I know that two & two make four—and should be glad to prove it too if I could—though I must say if by anysort of process I could convert 2 & 2 intofiveit would give me much greater pleasure.—LORD BYRON1813 letter to his future wife Annabella. Their daughter Ada Lovelace was the first programmer.CPREFACE. . . . . . . . . . . . . . . . . . . . . . . . . . . ix1 BASICS. . . . . . . . . . . . . . . . . . . . . . . . . .11.1 Ideas. . . . . . . . . . . . . . . . . . . . . . . .1 1.2 Logic. . . . . . . . .. . . . . . . . . . . . . . .5 1.3 Counting. . . . . . . . . . . . . . . . . . . . . .13 1.4 Probability. . . . . . . . . . . . . . . . . . . . .192 COMPLEXITY. . . . . . . . . . . . . . . . . . . . . . .252.1 Counting Time. . . . . . . . . . . . . . . . . . .27 2.2 TheBig-O Notation. . . . . . . . . . . . . . . .30 2.3 Exponentials. . . . . . . . . . . . . . . . . . . .31 2.4 Counting Memory .. . . . . . . . . . . . . . . . 333 STRATEGY. . . . . . . . . . . . . . . . . . . . . . . .353.1 Iteration. . . . . . . . . . . . . . . . . . . . . .35 3.2 Recursion .. . . . . . . . . . . . . . . . . . . .38 3.3 Brute Force. . . . . . . . . . . . . . . . . . . .40 3.4 Backtracking. . . . . . . . . . . . . . .. . . . .43 3.5 Heuristics. . . . . . . . . . . . . . . . . . . . .46 3.6 Divide and Conquer. . . . . . . . . . . . . . . .49 3.7Dynamic Programming . . . . . . . . . . . . . . 55 3.8 Branch and Bound . . . . . . . . . . . . . . . . . 584 DATA. . . . . . . . . . . . . . . . . . . . . . . . . . .654.1 Abstract Data Types. . . . . . . . . . . . . . . .67 4.2 CommonAbstractions . . . . . . . . . . . . . . . 68 4.3 Structures . . . . . . . . . . . . . . . . . . . . . 725 ALGORITHMS. . . . . . . . . . . . . . . . . . . . . . .855.1 Sorting. . . . . . . . . . . . . . . . . . . . . . .86 5.2 Searching. . . . . . . . . . . . . . . . . . . . .88 5.3 Graphs. . . . . . . . . . . . . . . . . . . . . . .89 5.4 Operations Research. . . . . . .. . . . . . . . . 95viiC E CIE CE I ILL6 DATABASES. . . . . . . . . . . . . . . . . . . . . . . .1016.1 Relational. . . . . . . . . . . . . . . . . . . . .102 6.2Non-Relational. . . . . . . . . . . . . . . . . . .110 6.3 Distributed. . . . . . . . . . . . . . . . . . . . .115 6.4 Geographical .. . . . . . . . . . . . . . . . . . . 119 6.5 Serialization Formats . . . . . . . . . . . . . . . 1207 COMPUTERS. . . . . . . . . . . . . . . . . . . . . . .1237.1 Architecture. . . . . . . . . . . . . . . . . . . .123 7.2Compilers . . . . . . . . . . . . . . . . . . . . . 131 7.3 Memory Hierarchy . . . . . . . . . . . . . . . . . 1388 PROGRAMMING. . . . . . . . . . . . . . . . . . . . . .1478.1 Linguistics. . . . . . . . . . . . . . . . . . . . .147 8.2Variables . . . . . . . . . . . . . . . . . . . . . . 150 8.3 Paradigms . . . . . . . . . . . . . . . . . . . . . 152CONCLUSION. . . . . . . . . . . . . . . . . . . . . . . . . 163APPENDIX. . . . . . . . . . . . . . . . . . . . . . . . . .165I Numerical Bases. . . . . . . . . . . . . . . . . .165 II Gauss’trick. . . . . . . . . . . . . . . . . . . .166 III Sets. . . . . . . . . . . . . . . . . . . . . . . .167 IV Kadane’s Algorithm. . . . . . .. . . . . . . . . 168viiiP AEverybody in this country should learnto program a computer, because it teaches you how to think.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 39 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture