# depth-first search

Published articles for depth-first search.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Binary Search on Graphs

DevFeed: [Binary Search on Graphs](<https://devfeed.tech/articles/binary-search-on-graphs-40417.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/11/08/binary-search-on-graphs/>)

Published: 2017-11-08T08:59:38Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [binary-search](<https://devfeed.tech/tags/binary-search.md>), [depth-first-search](<https://devfeed.tech/tags/depth-first-search.md>), [dijkstra](<https://devfeed.tech/tags/dijkstra.md>), [equivalence-queries](<https://devfeed.tech/tags/equivalence-queries.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [learning-theory](<https://devfeed.tech/tags/learning-theory.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [search](<https://devfeed.tech/tags/search.md>), [vertex](<https://devfeed.tech/tags/vertex.md>)

### AI overview

The article examines whether binary search can be applied to graphs. It presents a graph-search model in which queries about vertices return either the target or an edge on a shortest path toward it, and notes that the line-graph case corresponds to ordinary binary search.

### Source excerpt

Binary search is one of the most basic algorithms I know. Given a sorted list of comparable items and a target item being sought, binary search looks at the middle of the list, and compares it to the target. If the target is larger, we repeat on the smaller half of the list, and vice versa. With each comparison the binary search algorithm cuts the search space in half. The result is a guarantee of no more than $ \log(n)$ comparisons, for a total runtime of $ O(\log n)$.

## Why there is no Hitchhiker's Guide to Mathematics for Programmers

DevFeed: [Why there is no Hitchhiker's Guide to Mathematics for Programmers](<https://devfeed.tech/articles/why-there-is-no-hitchhiker-s-guide-to-mathematics-for-programmers-40302.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/02/08/why-there-is-no-hitchhikers-guide-to-mathematics-for-programmers/>)

Published: 2013-02-08T11:24:53Z

Content type: opinion

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Java](<https://devfeed.tech/topics/java.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [depth-first-search](<https://devfeed.tech/tags/depth-first-search.md>), [error](<https://devfeed.tech/tags/error.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [java](<https://devfeed.tech/tags/java.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [test](<https://devfeed.tech/tags/test.md>), [type-coercion](<https://devfeed.tech/tags/type-coercion.md>)

### AI overview

The article reflects on the author's development as a programmer and on the difficulty of learning mathematics for programming. It uses experiences with Java, C++, functional programming, recursive search, testing, and a segmentation fault to illustrate how programming mistakes can arise from design misunderstandings rather than syntax alone.

### Source excerpt

For those who aren't regular readers: as a followup to this post, there are four posts detailing the basic four methods of proof, with intentions to detail some more advanced proof techniques in the future. You can find them on this blog's primers page. Do you really want to get better at mathematics? Remember when you first learned how to program? I do. I spent two years experimenting with Java programs on my own in high school.

## Depth- and Breadth-First Search

DevFeed: [Depth- and Breadth-First Search](<https://devfeed.tech/articles/depth-and-breadth-first-search-40300.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/01/22/depth-and-breadth-first-search/>)

Published: 2013-01-22T11:44:27Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Graphs](<https://devfeed.tech/topics/graphs.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [graph theory](<https://devfeed.tech/topics/graph-theory.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [breadth-first-search](<https://devfeed.tech/tags/breadth-first-search.md>), [computer](<https://devfeed.tech/tags/computer.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [depth-first-search](<https://devfeed.tech/tags/depth-first-search.md>), [graph-theory](<https://devfeed.tech/tags/graph-theory.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [queue](<https://devfeed.tech/tags/queue.md>), [stack](<https://devfeed.tech/tags/stack.md>)

### AI overview

This tutorial introduces graph search through depth-first search and breadth-first search. It reviews directed graphs, vertices, edges, adjacency functions, and implementations of the basic graph data structure in mathematical terms and Python.

### Source excerpt

The graph is among the most common data structures in computer science, and it's unsurprising that a staggeringly large amount of time has been dedicated to developing algorithms on graphs. Indeed, many problems in areas ranging from sociology, linguistics, to chemistry and artificial intelligence can be translated into questions about graphs. It's no stretch to say that graphs are truly ubiquitous. Even more, common problems often concern the existence and optimality of paths from one vertex to another with certain properties.