Randomized algorithms for search problems where a found answer is a certificate (one-sided error: “yes” is always right), so repetition drives the failure probability down exponentially.

AlgorithmProblemTimeError
color coding (Alon, Yuster, Zwick 1995)simple path (or tree, cycle) with vertices expected, i.e. misses with probability
random walk for 2-SAT (Papadimitriou 1991)2-SAT expected flips per flips; the linear SCC algorithm is better in practice: SCC and 2-SAT
Schöning’s walk (1999) for -SAT3-SATexponential, but beats
Karger, Karger–Steinglobal minimum cutGlobal Min Cut
random restarts of local searchMAX-SAT, partitioningheuristicHeuristic Optimization

Color coding

Colour the vertices randomly with colours and look only for colourful paths (all colours distinct): these are automatically simple, and they are found by a DP over subsets of colours instead of subsets of vertices. A fixed -path is colourful with probability , so about colourings suffice. Variants: -cycles, trees of size (DP over the tree), weighted versions (minimum weight colourful path), and derandomization by perfect hash families.

// Is there a simple path with exactly k vertices? Monte Carlo with one-sided error; trials ~ e^k * ln(1/delta).
bool hasKPath(int n, const vector<vector<int>>& adj, int k, int trials, mt19937_64& rng) {
    if (k == 1) return n > 0;
    vector<int> col(n); vector<vector<char>> dp(1 << k, vector<char>(n));
    while (trials--) {
        for (auto& c : col) c = rng() % k;
        for (auto& row : dp) fill(all(row), 0);
        for (int v = 0; v < n; v++) dp[1 << col[v]][v] = 1;
        for (int mask = 1; mask < (1 << k); mask++) for (int v = 0; v < n; v++) if (dp[mask][v])
            for (int u : adj[v]) if (!(mask >> col[u] & 1)) dp[mask | 1 << col[u]][u] = 1;
        for (int v = 0; v < n; v++) if (dp[(1 << k) - 1][v]) return true;   // a colourful path is simple
    }
    return false;
}

Random walks for satisfiability

// Clauses as vectors of literals: +(v+1) for x_v, -(v+1) for not x_v. Returns a satisfying assignment or empty.
vector<char> walkSAT(int n, const vector<vector<int>>& cls, ll restarts, ll stepsPerRestart, mt19937_64& rng) {
    auto sat = [&](const vector<int>& c, const vector<char>& x) { for (int l : c) if ((l > 0) == (bool)x[abs(l) - 1]) return true; return false; };
    for (ll r = 0; r < restarts; r++) {
        vector<char> x(n); for (auto& b : x) b = rng() & 1;              // random start
        for (ll s = 0; s <= stepsPerRestart; s++) {
            vector<int> bad; for (int i = 0; i < sz(cls); i++) if (!sat(cls[i], x)) bad.push_back(i);
            if (bad.empty()) return x;
            if (s == stepsPerRestart) break;
            const auto& c = cls[bad[rng() % sz(bad)]];
            int v = abs(c[rng() % sz(c)]) - 1; x[v] ^= 1;                    // flip a random literal of a violated clause
        }
    }
    return {};
}
// 2-SAT (Papadimitriou): walkSAT(n, cls, 50, 2 * n * n, rng)    -> failure <= 2^-50 if satisfiable
// 3-SAT (Schoening):     walkSAT(n, cls, c * pow(4/3., n), 3 * n, rng)