Try   HackMD

Explaining
Z(X)f(X)=g(X)Z(ωX)

is a clever trick used in polynomial-based set equality checks. Let’s break it down step by step with an example.

Here is what we've got;

  1. Polynomials

    f(X) and
    g(X)
    :
    These interpolate values from the sets
    A={a0,a1,,ak1}
    and
    B={b0,b1,,bk1}
    , respectively. For example:
    f(X)=(a0+X)(a1+X)(ak1+X)
    ,
    g(X)=(b0+X)(b1+X)(bk1+X)
    .

  2. Roots of Unity

    ω :
    The domain
    H={1,ω,ω2,,ωk1}
    is built from a primitive
    kth
    root of unity
    ω
    , such that
    ωk=1
    . For example:
    • If
    k=4
    , then
    ω
    might be a complex number like
    i=1
    (since
    i4=1
    ).
    H={1,i,1,i}
    .

  3. Polynomial

    Z(X):
    This is a “helper polynomial” that relates
    f(X)
    and
    g(X)
    . Its purpose is to adjust
    f(X)
    and
    g(X)
    at points in
    H
    to test for set equality.

Approach
If

A and
B
are equal, then
f(X)=g(X)
, and
Z(X)
simplifies to
Z(X)=1
. Otherwise,
Z(X)
acts as a transformation that “balances”
f(X)
and
g(X)
over the domain
H
.

Example: Checking Two Sets

Step 1: Define Sets

Let’s check if

A={1,2,3} and
B={3,2,1}
are equal.

Step 2: Construct Polynomials

  1. For
    A
    , construct:

f(X)=(1+X)(2+X)(3+X).

  1. For
    B
    , construct:

g(X)=(3+X)(2+X)(1+X).

Notice that

f(X)=g(X) since the sets
A
and
B
contain the same elements.

Step 3: Choose a Root of Unity Domain

Let

k=3 , and let
ω
be a primitive 3rd root of unity such that
ω3=1
(e.g.,
ω=e2πi/3
).

Then the domain

H={1,ω,ω2} .

Step 4: Define

Z(X)

For this example:
• If

f(X)=g(X),Z(X)=1 satisfies:

Z(X)f(X)=g(X)Z(ωX).

Case: Unequal Sets

Now let’s take

A={1,2,3} and
B={4,5,6}
.

  1. Construct
    f(X)
    and
    g(X)
    :

f(X)=(1+X)(2+X)(3+X),

g(X)=(4+X)(5+X)(6+X).

  1. Check at
    X=1
    :
    Evaluate
    f(1)
    and
    g(1)
    :

f(1)=(1+1)(2+1)(3+1)=234=24,

g(1)=(4+1)(5+1)(6+1)=567=210.

Clearly,

f(1)g(1), so the sets
A
and
B
are not equal.

If

f(X)g(X), no
Z(X)
can balance them over
H
, proving
AB
.