To establish strong NP-completeness, use an explicit adjacency matrix encoding for a finite simple graph, with enough length information to recover its number of vertices. Let be the canonical binary numeral system representation of the nonnegative integer . Define
and, using the unary numeral system for ,
The surrounding pairing syntax delimits the two components, so the empty unary field can encode if zero is included in the convention for natural numbers. Malformed descriptions are excluded from both formal languages.
Fix a unary no-instance , for example one isolated vertex with requested size . The polynomial-time many-one reduction is
Map malformed inputs to too. When , only the numerical representation changes, so the existence of a -clique is unchanged. When , the original instance is false, since a subset of vertices cannot be larger than the whole vertex set; is false as required.
The important size bound is in the branch that writes . The original explicit graph description already has length at least , so the output has polynomial length and can be written in polynomial time. If a huge binary numeral system value is supplied, compare it with using its digit length and, when needed, a digit comparison; do not first allocate or print symbols. Merely replacing an unrestricted binary by would not be a valid polynomial-time reduction.
Thus . The unary version is in NP by the same clique complexity certificate verification, and is NP-hard by this polynomial-time many-one reduction and part (e). Therefore
This conclusion uses the conventional explicit graph encoding; a succinct circuit description of a graph would be a different input representation and a different problem.
Cancel one unary symbol from each block at each round. Mark the first, middle and last delimiters by , respectively; use for a cancelled symbol in the left block and for one in the right block. These are extra tape symbols of the Turing machine, all distinct from and blank. No numerical counter is needed in the finite control.
Starting on the first zero, replace it by , scan right through the first block of ones to replace the next zero by , then scan right through the second block and replace its terminal zero by . Move left to . If the initial head is on a blank immediately before the first zero, first move right to that zero. The cancellation loop always starts with the head at :
  • Move right past the symbols. If the next symbol is , all right-hand ones have been cancelled; enter the successful cleanup below.
  • Otherwise that symbol is . Replace it by , move left past right-block symbols to , and continue left past any symbols.
  • If the next symbol is , replace it by . Move right past the symbols back to and repeat the loop.
  • If instead the next symbol is , the left block is exhausted while the right block still needed a cancellation. Enter the zero-result cleanup below.
After completed rounds, the invariant is
It holds initially with , and each completed round changes exactly one remaining in each block into the corresponding marker. This proves the cancellation count and preserves the locations of all delimiters.
For successful cleanup, the right block is entirely symbols. From , sweep right, erasing all symbols and finally , then move left across the erased blanks back to the still-present . Erase and continue left, erasing each , until reaching either the last surviving or . Move one cell right and write the new terminal zero there. Move left through the surviving ones to , replace by , and halt. The remaining nonblank tape is exactly
For example, represents and becomes , representing three.
For zero-result cleanup, the head has reached . Sweep right, erasing everything through while retaining ; after erasing , move left across the blanks to . Replace by , write a second zero in the next cell, and halt. Thus if the machine returns . If , successful cleanup also leaves . With this explicit choice of behaviour,
Each sweep seeks a retained delimiter or an end marker a finite distance away. Each completed round removes one right-block ; after at most completed rounds either cleanup or left-block exhaustion occurs. The stated scans, writes and single-cell moves are implementable by finitely many states, so this is an implementation-level Turing machine construction. The output represents zero; a negative integer cannot be represented in the unsigned unary numeral system specified here.
Strong NP-completeness 2026-10-31
An NP decision problem is strongly NP-complete when its NP-hardness persists with numerical parameters written in the unary numeral system. An important proof method bounds every relevant numerical value by a polynomial in the remaining explicit input size. For the clique decision problem, values can be mapped to one fixed no-instance; otherwise writing takes only polynomial time. The distinction is representation-sensitive, so an explicit graph encoding must be specified.