To find hidden connections between two concepts, four computational methods can be applied simultaneously: BFS pathfinding traces the shortest chain of hyperlinks between two Wikipedia articles, SPARQL ontological reasoning queries Wikidata to find common ancestors in classification hierarchies, TF-IDF cosine similarity measures statistical overlap between concept descriptions, and formal logic propositions generate verifiable syllogisms from shared properties. MapOfLogic is a free tool that runs all four methods on any pair of concepts.

Every idea in human knowledge is connected to every other idea. The question is not whether two concepts are connected, but how — through what chain of logic, what shared properties, what common ancestors in the tree of knowledge.

This guide explains the four methods that computational systems use to discover these connections, and how you can apply them to any pair of concepts using freely available tools and data sources.

Method 1: BFS Pathfinding Through Wikipedia

Graph traversal

What it does

Treats Wikipedia as a directed graph — each article is a node, each internal hyperlink is an edge — and finds the shortest path between two articles using Breadth-First Search.

Wikipedia contains over 60 million articles connected by hundreds of millions of internal hyperlinks. These hyperlinks are not random — they represent verified editorial decisions about which concepts are related to each other. When an editor adds a link from the article "Physics" to the article "Wave," they are encoding a factual relationship.

BFS (Breadth-First Search) exploits this structure. Starting from Concept A, the algorithm explores every article linked from it. Then every article linked from those. Then the next level. It expands outward level by level until it reaches Concept B.

The result is the shortest chain of article-to-article links. For example:

Physics → Wave → Sound → Music (3 hops)

Mathematics → Logic → Philosophy → Ethics → Law (4 hops)

Each hop is a verified Wikipedia hyperlink — not an inference, not a guess, but an editorial decision made by a human contributor. This makes BFS paths traceable and verifiable.

Try it: type any two concepts separated by + and see the BFS path

LAUNCH MAPOFLOGIC →

Method 2: SPARQL Ontological Reasoning Over Wikidata

Ontological reasoning

What it does

Queries Wikidata's structured knowledge graph using SPARQL to find common ancestors — shared categories in the classification hierarchy that both concepts belong to.

Wikidata is a structured knowledge base with over 100 million entities, each classified into hierarchies using the "subclass of" property (P279). Every concept in Wikidata belongs to a chain of increasingly general categories. For example:

By tracing these hierarchies upward from both concepts, the algorithm finds where they converge. The point of convergence is the common ontological ancestor — the most specific category that both concepts share.

This is formal ontological reasoning, not keyword matching. The connection is derived from the structure of human knowledge itself, encoded by thousands of Wikidata contributors.

Method 3: TF-IDF Cosine Similarity

Statistical analysis

What it does

Computes a numerical similarity score between two concepts by analyzing the statistical distribution of terms in their Wikipedia descriptions.

TF-IDF (Term Frequency-Inverse Document Frequency) is a method from information retrieval that converts text into numerical vectors. Each word in a document gets a weight based on how important it is to that specific document relative to all documents in the corpus.

When applied to two Wikipedia articles, TF-IDF creates a vector for each concept. The cosine similarity between these vectors measures how much the two concepts share in terms of vocabulary and semantic content.

This method discovers connections that are not visible through link analysis. Two concepts might not link to each other in Wikipedia, and they might not share an obvious ontological ancestor in Wikidata, but their descriptions might use remarkably similar language — revealing a structural similarity that only statistical analysis can detect.

Method 4: Formal Logic Propositions

Formal logic

What it does

Generates verifiable syllogisms — logical statements with premises and conclusions — based on shared Wikidata properties between two concepts.

When two concepts share a property in Wikidata — for example, both have the same "field of study" or both are "instances of" the same type — the system generates a formal logical proposition:

Premise 1: Physics is studied in the field of Natural Science

Premise 2: Music is studied in the field of Cognitive Science

Conclusion: Both Physics and Music are objects of scientific inquiry, connected through the academic framework of empirical study

Confidence: based on property verification in Wikidata

Each premise is traceable to a specific Wikidata property. The conclusion is derived, not fabricated. This makes formal logic propositions the most auditable form of connection — every step can be verified independently.

Why These Four Methods Together

Each method discovers a different type of connection:

Two concepts might be strongly connected by one method and weakly by another. Running all four simultaneously gives the most complete picture of how two ideas relate.

MapOfLogic is a free tool created by Niseus that runs all four methods on any pair of concepts. It uses Wikipedia (60M+ articles) and Wikidata (100M+ entities) as its knowledge base. No account required. Entirely client-side — no data is collected.

Find the hidden connection between any two ideas

LAUNCH MAPOFLOGIC →