This master reference cheat sheet provides a rapid, high-density summary of core formulas, algorithmic time and space complexities, mathematical symbols, and essential Python syntax across the entire artificial intelligence curriculum.
| Algorithm | Time Complexity | Space Complexity | Complete? | Optimal? |
|---|---|---|---|---|
| Breadth-First Search (BFS) | ( O(b^d) ) | ( O(b^d) ) | Yes | Yes (unit costs) |
| Depth-First Search (DFS) | ( O(b^m) ) | ( O(b cdot m) ) | No | No |
| Iterative Deepening (IDS) | ( O(b^d) ) | ( O(b cdot d) ) | Yes | Yes (unit costs) |
| A* Search | ( O(b^d) ) (worst) | ( O(b^d) ) | Yes | Yes (if admissible) |
| Minimax (Full Tree) | ( O(b^m) ) | ( O(b cdot m) ) | Yes | Yes |
| Alpha-Beta Pruning | ( O(b^{m/2}) ) (best) | ( O(b cdot m) ) | Yes | Yes |
| K-Means Clustering | ( O(I cdot K cdot N cdot d) ) | ( O(N cdot d) ) | Heuristic | Local optimum |
| Self-Attention Layer | ( O(N^2 cdot d) ) | ( O(N^2 + N cdot d) ) | Deterministic | N/A |
# PyTorch: Set device dynamically
device = torch.device("cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu"))
# Hugging Face: Instant Text Generation Pipeline
from transformers import pipeline
generator = pipeline('text-generation', model='meta-llama/Meta-Llama-3-8B-Instruct', device_map='auto')
output = generator("Explain quantum computing in 2 sentences.", max_new_tokens=50)
# ChromaDB: Instant Vector Search
import chromadb
client = chromadb.Client()
coll = client.create_collection("docs")
coll.add(documents=["AI rules the world", "Cats are cute"], ids=["1", "2"])
print(coll.query(query_texts=["artificial intelligence"], n_results=1))
# Launch Local Model with Ollama CLI
ollama run llama3
Broaden your foundational and advanced AI knowledge across our curriculum:
Apply cheat sheet code snippets directly into executable lab projects.
Deepen your conceptual mastery of the formulas and libraries listed.
Build in-demand skills and launch a career in artificial intelligence.
Explore all 52 comprehensive classes of the Veewom AI tutorial series.