[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-43365-en":3,"doc-seo-43365-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},43365,1374391974468,"Eden","https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0",6,"Technology","Algorithm Design with Haskell","Algorithm Design with Haskell presents five core algorithm design principles—divide and conquer, greedy algorithms, thinning, dynamic programming, and exhaustive search—taught through the purely functional language Haskell. The book uses carefully chosen examples to compare algorithmic ideas and to expose the conditions under which each approach applies. Equational reasoning supports clear correctness arguments and guides derivations of algorithms, while each chapter ends with extensive exercises and complete answers to reinforce practical mastery and independent problem solving.","ALGORITHM DESIGN WITH HASKELL  \nThis book is devoted to ﬁve main principles of algorithm design: divide and conquer, greedy algorithms, thinning, dynamic programming, and exhaustive search. These principles are presented using Haskell, a purely functional language, leading to simpler explanations and shorter programs than would be obtained with imperative languages. Carefully selected examples, both new and standard, reveal the commonalities and highlight the differences between algorithms. The algorithm developments use equational reasoning where applicable, clarifying the applicability conditions and correctness arguments. Every chapter concludes with exercises (nearly 300 in total), each with complete answers, allowing the reader to consolidate their understanding and apply the techniques to a range of problems. The book serves students (both undergraduate and postgraduate), researchers, teachers, and professionals who want to know more about what goes into a good algorithm and how such algorithms can be expressed in purely functional terms.  \nALGORITHM DESIGN WITH HASKELL  \nRICHARD BIRD  \nUniversity of Oxford  \nJEREMY GIBBONS  \nUniversity of Oxford  \nUniversity Printing House, Cambridge CB2 8BS, United Kingdom One Liberty Plaza, 20th Floor, New York, NY 10006, USA  \n477 Williamstown Road, Port Melbourne, VIC 3207, Australia 314–321, 3rd Floor, Plot 3, Splendor Forum, Jasola District Centre, New Delhi – 110025, India  \n79 Anson Road, \\#06–04/06, Singapore 079906  \nCambridge University Press is part of the University of Cambridge.  \nIt furthers the University’s mission by disseminating knowledge in the pursuit of education, learning, and research at the highest international levels of excellence.  \n[www.cambridge.org](www.cambridge.org)  \nInformation on this [title: www.cambridge.org/9781108491617](title: www.cambridge.org/9781108491617)[ ](title: www.cambridge.org/9781108491617)DOI: 10. 1017/9781108869041  \n© Richard Bird and Jeremy Gibbons 2020  \nThis publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press.  \nFirst published 2020  \nPrinted in the United Kingdom by TJ International Ltd, Padstow Cornwall A catalogue record for this publication is available from the British Library.  \nISBN 978-1-108-49161-7 Hardback  \nCambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.  \nFor Stephen Gill (RB) and Sue Gibbons (JG) .  \nContents  \nPreface page xiii  \nPART ONE BASICS 1  \n1 Functional programming 5  \n1.1 Basic types and functions 5  \n1.2 Processing lists 7  \n1.3 Inductive and recursive deﬁnitions 9  \n1.4 Fusion 11  \n1.5 Accumulating and tupling 14  \n1.6 Chapter notes 16  \nReferences 16  \nExercises 16  \nAnswers 19  \n2 Timing 25  \n2.1 Asymptotic notation 25  \n2.2 Estimating running times 27  \n2.3 Running times in context 32  \n2.4 Amortised running times 34  \n2.5 Chapter notes 38  \nReferences 38  \nExercises 38  \nAnswers 40  \n3 Useful data structures 43  \n3.1 Symmetric lists 43  \nviii Contents  \n3.2 Random-access lists 47  \n3.3 Arrays 51  \n3.4 Chapter notes 53  \nReferences 54  \nExercises 54  \nAnswers 56  \nPART TWO DIVIDE AND CONQUER 59  \n4 Binary search 63  \n4.1 A one-dimensional search problem 63  \n4.2 A two-dimensional search problem 67  \n4.3 Binary search trees 73  \n4.4 Dynamic sets 81  \n4.5 Chapter notes 84  \nReferences 84  \nExercises 85  \nAnswers 87  \n5 Sorting 93  \n5.1 Quicksort 94  \n5.2 Mergesort 96  \n5.3 Heapsort 101  \n5.4 Bucketsort and Radixsort 102  \n5.5 Sorting sums 106  \n5.6 Chapter notes 110  \nReferences 110  \nExercises 111  \nAnswers 114  \n6 Selection 121  \n6.1 Minimum and maximum 121  \n6.2 Selection from one set 124  \n6.3 Selection fro","cbCaipo5Mtq8BAQN","https://ap.wps.com/l/cbCaipo5Mtq8BAQN","pdf",2260001,3,1,454,"English","en",105,"# Preface\n# Functional programming\n## Basic types and functions\n## Processing lists\n## Inductive and recursive definitions\n## Fusion\n## Accumulating and tupling\n## Chapter notes\n# Timing\n## Asymptotic notation\n## Estimating running times\n## Running times in context\n## Amortised running times\n## Chapter notes\n# Useful data structures\n## Symmetric lists\n## Random-access lists\n## Arrays\n## Chapter notes\n# Divide and Conquer\n## Binary search\n## Sorting\n## Selection\n# Greedy Algorithms\n## Greedy algorithms on lists\n## Greedy algorithms on trees\n## Greedy algorithms on graphs","[{\"question\":\"Which five algorithm design principles does the book focus on?\",\"answer\":\"The book centers on divide and conquer, greedy algorithms, thinning, dynamic programming, and exhaustive search.\"},{\"question\":\"How does the book use Haskell in its explanations?\",\"answer\":\"It presents these principles in Haskell, leveraging purely functional style to make explanations and programs shorter and clearer than typical imperative approaches.\"},{\"question\":\"What learning support is provided at the end of each chapter?\",\"answer\":\"Each chapter concludes with exercises (nearly 300 total) and complete answers, helping readers consolidate understanding and apply techniques across problem types.\"}]",1783380321,1144,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"algorithm-design-with-haskell","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/technology/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/algorithm-design-with-haskell/43365/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-13","2026-07-06",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"Which five algorithm design principles does the book focus on?","Question",{"text":75,"@type":76},"The book centers on divide and conquer, greedy algorithms, thinning, dynamic programming, and exhaustive search.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does the book use Haskell in its explanations?",{"text":80,"@type":76},"It presents these principles in Haskell, leveraging purely functional style to make explanations and programs shorter and clearer than typical imperative approaches.",{"name":82,"@type":73,"acceptedAnswer":83},"What learning support is provided at the end of each chapter?",{"text":84,"@type":76},"Each chapter concludes with exercises (nearly 300 total) and complete answers, helping readers consolidate understanding and apply techniques across problem types.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,113,118,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]