Skip to main content
Ctrl+K

Laptop Lab

Mathematics

  • Figures
  • Calculus
    • Pre Calculus
      • Euclidean Trigonometry
      • Conic Sections
    • The Calculus
      • Limits
      • Derivatives
      • Integration
        • Integration
        • Techniques of Integration
        • Double Integration
        • Triple Integration
        • The Bell Curve, Gaussian Integral, & Error Function
        • HW1
      • Indeterminate Forms
      • Sequences & Series
      • Elementary Complex Analysis
    • Vector Calculus
      • Vectors
      • Dot Product
      • Vector Projection
      • Cross Product
      • Vector Functions
      • Gradient
      • Vector Fields
      • Line Integrals of Vector Fields
      • Curves & Surfaces and their Parameterizations
      • Coordinate Systems
        • Polar Coordinates
        • Cylindrical Coordinates
        • Spherical Coordinates
        • Transformations
    • Matrix Calculus
    • Tensor Calculus
    • Variational Calculus
  • Functions
    • Absolute Value
    • Boxcar Function
    • Floor and Ceiling
    • Heaviside Function
    • Ramp Function
    • Continuous Uniform Function
  • Linear Algebra
    • Introduction to Linear Systems
    • Linear Combinations
    • Homogeneity of Linear Systems
    • Linear Independence
    • Linear Transformations
    • More on Linear Transformations
    • Invertible Matrices
    • Vectors
    • Matrices
    • Some examples of the use of KaTeX
  • Algebra
    • Book: A Transition to Advanced Mathematics
  • Number Theory
    • Arithmetic
    • Fractions
    • Mathematical Induction
    • Binomial
    • Fibonacci
    • Division
    • Residues
    • Arithmetic Functions
    • Polynomials
    • Primitive Roots
    • Quadratic Residues
    • Exercises
    • Implementations
    • Book: Numbers, Groups, and Codes
      • Introduction
      • GCD & Euclid’s Algorithm
      • Congruence
      • Linear Congruences
      • 1.1
      • 1.2
      • 1.3
      • 1.4
      • 1.5
  • Logic
    • Introduction
  • Discrete Mathematics
    • Elementary Set Theory
    • Order Theory
    • Relations
    • Combinatorics
    • Formal Languages and Machines
  • Error-Correcting Codes
    • FCCT
      • Introduction to error-correcting codes
      • The main coding theory problem
      • Exercises
    • ECFF
      • Introduction & Block Codes, Weight, and Distance
      • Exercises
    • Codes
      • Repetition Codes
      • Parity Check Codes
      • Triple Check Code
      • Intro to binary codes C1, C2, C3
      • (32,64,16) Reed-Muller Code
  • Linear Programming
    • Some Definitions & Graphing
    • Convexity
    • Cones & Dual Cones
    • Row Tableaux
    • Dual LP & Sensitivity Analysis
    • Example
    • [13.2] Production Problem
    • Midterm II
  • Numerical Methods & Scientific Computing
  • More Math
    • Summations
    • Computer Algebra Systems

Computer Science & Engineering

  • Systems
    • C
    • Shell
      • Bash
    • Network Programming
    • OS
      • macOS
      • macOS Utilities
      • Windows
      • Windows Utilities
    • Distributed
      • Blockchain
      • Bitcoin
      • Ethereum
    • Hardware
    • Embedded
    • Filesystem
  • DS&A
    • Algorithms
    • Data Structures
      • Linked List
      • Stack
      • Queue
      • Priority Queue
    • Arithmetic
      • Array Sum
      • Integer Multiplication
    • Deduplication
    • Merge
      • Sorted Array Merge
      • \(k\)-Way Merge
    • Select
      • Naive Selection: \(k\)-th smallest element
      • Quickselect
    • Sort
      • Insertion Sort
      • Bubble Sort
      • Merge Sort
      • Selection Sort
      • Quick Sort
    • Search
      • Linear Search
      • Binary Search
    • Trees & Graphs
      • Trees
      • Graphs
    • Optimization
      • Linear Programming
      • Dynamic Programming
        • Lucas Numbers
        • Bellman-Ford
        • 0-1 Knapsack
    • PSU CMPSC 465
      • Assignment 1
      • Assignment 2
      • Assignment 3
      • Assignment 4
      • Assignment 5
      • Midterm
      • Assignment 6
      • Assignment 7
      • Assignment 8
      • Final
  • Programming
    • Editors
      • Vim
      • VSCode
    • Assembly
    • https://github.com/heracliteanflux/systems/tree/main/clang
    • Python
      • Packages
      • Data Science from Scratch 2e
    • R
      • Data Computing 2
      • R for Data Science 1
      • Silge & Robinson’s Text Mining with R
      • Forecasting: Principles and Practice 3
      • A01 - Tidy Data
      • A02 - Graphical Exploration
      • A04 - Data Wrangling
      • A05 - Project: Popular Names
      • A06 - Project: Bird Species
      • A07 - Project: Bicycle Sharing
      • A08 - Project: Scraping Nuclear Reactors
      • A09 - Project: Street or Road?
      • A10 - Base R
    • Go
    • D
    • Ruby
    • Notebook
    • Web
    • VR
    • Software Development
    • Documentation
    • Troubleshooting
  • Security
    • AI Sec
    • Cloud
    • Cryptography
    • CTF
      • OverTheWire
      • AOC2023
    • Defensive Sec
    • DevOps
    • Digital Forensics
    • DNS
    • GitOps
      • Git
      • GitHub
    • Hardware Sec
    • IoT
    • Malware
    • Mobile
    • Networking
      • Ethernet
      • Internet Protocol
    • OffSec
    • Passwords
    • Privacy
    • SSH
    • VMs
    • WebSec
  • Data
    • Relational
      • Postgres
      • MySQL
      • SQLite
      • Derby
    • NoSQL
    • Big Data
    • Files
    • Date Times
    • Unicode
    • Graph Data
  • Information
  • Computation
  • Artificial Intelligence
    • Robotics
    • Prompt Engineering
  • Graphics
  • Retro Gaming

Other Stuff

  • Languages & Linguistics
    • Linguistics
      • Phonetics
        • Articulatory Phonetics
        • The Acoustic Theory of Speech Production
        • Speech Processing
        • Auditory Phonetics
        • Speech Perception
        • Analysis of Speech Sounds
        • Acoustic properties of Anii vowels
        • Acoustics and audition
        • Sociophonetic properties of vowels and fricatives
        • Analysis of a stop continuum
        • Acoustic and auditory properties of speech sounds
      • Phonology
      • Morphology & Syntax
      • Semantics
      • Historical Linguistics
    • Languages
      • Constructed
      • Latin
    • Literature
      • Poetry
      • Rhetoric
      • Science Fiction
      • Tolkien
  • Philosophy
    • Ancient Philosophy
      • Ancient Near East
      • Archaic Greece
      • The Milesians
      • Anaxagoras
      • Heraclitus
      • Parmenides
      • Empedocles
      • Socrates
      • Plato
      • Aristotle
      • Atomism
      • The Megarians and Dialectic
      • Philosophical Greek
    • Medieval Philosophy
    • Early Modern Philosophy
      • Galileo
        • The Assayer (1623)
      • Hobbes
      • Descartes
        • Meditations on First Philosophy (1641)
        • Meditation I: Concerning Those Things That Can Be Called into Doubt
        • Meditation II: Concerning the Nature of the Human Mind: That It Is Better Known Than the Body
        • Meditation III: Concerning God, That He Exists
        • Meditation IV: Concerning the True and the False
        • Meditation V: Concerning the Essence of Material Things, and Again Concerning God, That He Exists
        • Meditation VI: Concerning the Existence of Material Things, and the Real Distinction between Mind and Body
        • Elisabeth’s Objection
      • Spinoza
      • Leibniz
      • Newton
      • Locke
      • Hume
      • Berkeley
      • Kant
    • Metaphysics & Ontology
    • Epistemology
    • Ethics
    • Aesthetics
    • Existentialism
    • Philosophy of Law
    • Political Philosophy and its history
    • Philosophy of History and the History of Ideas
    • Friendship and Love
    • American Philosophy
    • Chinese Philosophy
    • French Philosophy
    • Japanese Philosophy
    • Spanish Philosophy
    • History and Philosophy of Science
    • History & Philosophy of Physics & Cosmology
    • History and Philosophy of Chemistry
    • Philosophy of Biology
    • History & Philosophy of Language & Linguistics
    • Philosophy of Math
    • Philosophy of Mind & Consciousness
    • Music
  • Science
    • Astronomy & Astrophysics
      • Telescopes
    • Chemistry
    • Electrical Engineering & Electronics
      • Electromagnetism
      • Electronics
      • Electrical
    • Health & Medicine
  • Home Lab & DIY
    • 3D Print
    • Audio
    • Auto
    • Building
    • EDC
    • Game
    • IAQ
    • Metal
    • Network

Search

Contents

  • Contents
  • The Search Problem
  • Sections
  • Terms

Search#


Contents#

Contents

  • Search

    • Contents

    • The Search Problem

    • Sections

    • Terms


The Search Problem#

\(\text{Problem} \quad \text{}\)

\( \begin{aligned} \text{ Input} && & \text{A sequence of}\,\, n \,\,\text{numbers}\,\, \langle a_1, a_2, \dotsc, a_n \rangle \,\,\text{stored in array}\,\, A[1:n], \,\,\text{and a value}\,\, x \\ \text{ Output} && & \text{An index}\,\, i \,\,\text{such that}\,\, x \,\,\text{equals}\,\, A[i], \,\,\text{or the special value NIL if}\,\, x \,\,\text{does not appear in}\,\, A \\ \end {aligned} \)


Sections#

  • Linear Search
  • Binary Search

Terms#

  • [ w ] Binary Search

  • [ w ] Decision Problem

  • [ w ] Hash Table

  • [ w ] Linear Search

  • [ w ] Linear Search Problem

  • [ w ] Search Algorithm

  • [ w ] Search Data Structure

  • [ w ] Search Problem

  • [ w ] Ternary Search


previous

Quick Sort

next

Linear Search

Contents
  • Contents
  • The Search Problem
  • Sections
  • Terms

By DF