Home > Store

Algorithms and Programs: An AI-Assisted Approach

Register your product to gain access to bonus material or receive a coupon.

Algorithms and Programs: An AI-Assisted Approach

eBook

  • Your Price: $38.39
  • List Price: $47.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Also available in other formats.

Description

  • Copyright 2027
  • Pages: 144
  • Edition: 1st
  • eBook
  • ISBN-10: 0-13-588753-4
  • ISBN-13: 978-0-13-588753-0

Algorithms power modern systems--from flight control and robotics to recommendation engines and AI applications. Algorithms and Programs: An AI-Assisted Approach shows how to clearly define an algorithm's purpose, design a structured outline, translate it into reliable code, and reason about its efficiency and complexity.

Rather than relying on traditional pseudocode, this book uses precise algorithm outlines that are easier to understand and directly support correct implementation. This approach bridges the gap between design and code, reducing ambiguity and minimizing errors.

Each algorithm is expressed as a sequence of clear, intended outcomes, which naturally define its correctness conditions and support reasoning about invariants and program behavior. This structured method encourages better programming practice, improves reliability, and aligns well with modern AI-assisted development tools.

  • Practical approach to algorithms: Moves beyond traditional pseudocode to clear, structured algorithm outlines that directly translate into reliable code.
  • Bridges theory and real-world programming: Helps learners and engineers connect algorithm design with implementation, correctness, and performance in everyday software development.
  • Makes invariants intuitive and usable: Developed from decades of teaching experience, the book rethinks invariants in a practical, common-sense way that students and practitioners can actually apply.
  • Designed for modern AI-assisted development: Aligns with how programming is done today, enabling AI-checkable algorithm structures that support correctness and reduce errors.
  • Rooted in teaching and real industry experience: Inspired by long-term discussions with students and professional practice, addressing real gaps between academic concepts and industry needs.
  • Strategic AI Thinking: Explore leverage from AI platforms that specify function requirements, outline appropriate algorithms, implement outlines, and inspect them reliably.

Sample Content

Table of Contents

Chapter 1. Specifying Problems, Functions, and Classes                   1

1.1. Declarative Language.. . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . 1

1.2. Specifying Functions.. . . . . . . . . . . . . . . . . . . . . . .. . .  . . . . . . . . . . . . . . . . . 1

1.3. Generic Problem Formulation.. . . . . . . . . . . . . . . . . . . . .. . . . . . . .. . . . . . . . 4

1.4. Specifying Classes.. . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . . . . 5

Chapter 2. Expressing Algorithms and Their Complexity                                   7

2.1. Algorithm Decomposition.. . . . . . . . . . . . . . . . .  . . . . . .  . . . . . . . . . . . . . . . . 8

2.2. Using AI for Algorithm Development.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3. Complexity.. . . . . . . . . . . . . . . . . . . . . . .  . . . . . .  . . . . . . . . . . . . . . . . . . . . . 17

Chapter 3. Algorithm Creation and Analysis                       23

3.1. Decomposition of Algorithms.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.2. Outlining Algorithms.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3.3. Pragmatic Outcomes.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . 27

3.4. Creating Outcomes.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.5. Implementing an Invariant Outcome with Loops.. . . . . . . . . . . . . . . . . . . . 33

3.6. Other Approaches to Creating Invariant Outcomes.. . . . . . . . . . . . . . . . . . . 35

3.7. Outcome Implementation.. . . . . . . . . . . . . . . . . . . . . . . .  . . . . . .. . . . . . . 37

Chapter 4. Divide-and-Conquer                             41

4.1. Divide-and-Conquer Definition.. . . . . . . . . . . . . . . . . .. . . . . . . . . .  . . . . . . . 42

4.2. Example Application 1: Most Valuable Subsequence.. . . . . . . . . . . . . . . . . . . 47

4.3. Example Application 2: Binary Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

4.4. Time Complexity of Binary Search.. . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . 51

4.5. False Divide-and-Conquer.. . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . 53

4.6. Maximum Sublist Example: An Alternative Algorithm. . . . . . . . . . . . . . . . . . 54

4.7. Time Complexity of the Maximum Sublist Algorithm.. . . . . . . . .  . . . . . . . . 56

Chapter 5. Sorting                                                      59

5.1. An Application of Weakening Postconditions: Weakening Is Ordered.. .. .. . 59

5.2. A Sorting Algorithm Outline Based on Weakened Order.. . . . . . . . . . . . . . . 60

5.3. Insert Sort.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 63

5.4. Mergesort. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

5.5. Quicksort.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

5.6. Heapsort.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .  . . . . . . . . 68

5.7. Radix Sort.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . .. . . . . . . . . . . . 70

5.8. Example of a Custom Algorithm.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . 73

Chapter 6. Dynamic Programming                       75

6.1. Definition of Dynamic Programming and the Rod-Cutting Example.. . . . . . . . . 75

6.2. Time Complexity of Dynamic Programming.. . . . . . . . . . . . . . . . . . . . . . . . . . . 80

6.3. Longest Common Subsequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Chapter 7. Greedy Algorithms                               85

7.1. The Greedy Algorithm.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

7.2. Room Scheduling Example Completed.. . . . . . . . . . . . . . . .. . . . . . . . . . . . 90

7.3. Huffman Codes Example.. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . 92

7.4. Time Complexity of Greedy Algorithms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Chapter 8. Minimum Spanning Trees                                    99

8.1. Graphs.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . 99

8.2. Definition of Minimum Spanning Tree.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

8.3. Prims MST Algorithm.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

8.4. Kruskals MST Algorithm.. . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . . . . . . . . 106

Chapter 9. Shortest Paths                       109

9.1. The Shortest Path Problem.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

9.2. The Bellman-Ford Algorithm.. . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . 112

9.3. Dijkstras Algorithm.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . 116

Index                          121

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.