# 3.4 The prime factor algorithm

 Page 1 / 1

## General index maps

$n=({K}_{1}{n}_{1}+{K}_{2}{n}_{2})\mod N$ $n=({K}_{3}{k}_{1}+{K}_{4}{k}_{2})\mod N$ ${n}_{1}$

0 1 N 1 1
${k}_{1}$
0 1 N 1 1
${n}_{2}$
0 1 N 2 1
${k}_{2}$
0 1 N 2 1

The basic ideas is to simply reorder the DFT computation to expose the redundancies in the DFT , and exploit these to reduce computation!

Three conditions must be satisfied to make this map serve our purposes

• Each map must be one-to-one from $0$ to $N-1$ , because we want to do the same computation, just in a different order.
• The map must be cleverly chosen so that computation is reduced
• The map should be chosen to make the short-length transforms be DFTs . (Not essential, since fast algorithms for short-length DFT -like computations could be developed, but it makes our work easier.)

## Case i

${N}_{1}$ , ${N}_{2}$ relatively prime (greatest common denominator $1$ ) i.e. $\gcd ({N}_{1}, {N}_{2})=1$

${K}_{1}=a{N}_{2}$ and/or ${K}_{2}=b{N}_{1}$ and $\gcd ({K}_{1}, {N}_{1})=1$ , $\gcd ({K}_{2}, {N}_{2})=1$

## Case ii

${N}_{1}$ , ${N}_{2}$ not relatively prime: $\gcd ({N}_{1}, {N}_{2})> 1$

${K}_{1}=a{N}_{2}$ and ${K}_{2}\neq b{N}_{1}$ and $\gcd (a, {N}_{1})=1$ , $\gcd ({K}_{2}, {N}_{2})=1$ or ${K}_{1}\neq a{N}_{2}$ and ${K}_{2}=b{N}_{1}$ and $\gcd ({K}_{1}, {N}_{1})=1$ , $\gcd (b, {N}_{2})=1$ where ${K}_{1}$ , ${K}_{2}$ , ${K}_{3}$ , ${K}_{4}$ , ${N}_{1}$ , ${N}_{2}$ , $a$ , $b$ integers

Requires number-theory/abstract-algebra concepts. Reference: C.S. Burrus
Conditions of one-to-oneness must apply to both $k$ and $n$

## Conditions for arithmetic savings

$X({k}_{1}, {k}_{2})=\sum_{{n}_{1}=0}^{{N}_{1}-1} \sum_{{n}_{2}=0}^{{N}_{2}-1} x({n}_{1}, {n}_{2}){W}_{N}^{\left({K}_{1}{n}_{1}+{K}_{2}{n}_{2}\right)\left({K}_{3}{k}_{1}+{K}_{4}{k}_{2}}=\sum_{{n}_{1}=0}^{{N}_{1}-1} \sum_{{n}_{2}=0}^{{N}_{2}-1} x({n}_{1}, {n}_{2}){W}_{N}^{{K}_{1}{K}_{3}{n}_{1}{k}_{1}}{W}_{N}^{{K}_{1}{K}_{4}{n}_{1}{k}_{2}}{W}_{N}^{{K}_{2}{K}_{3}{n}_{2}{k}_{1}}{W}_{N}^{{K}_{2}{K}_{4}{n}_{2}{k}_{2}}$
• ${K}_{1}{K}_{4}\mod N=0$ exclusive or ${K}_{2}{K}_{3}\mod N=0$ Common Factor Algorithm (CFA). Then $X(k)={\mathrm{DFT}}_{Ni}(\text{twiddle factors}{\mathrm{DFT}}_{Nj}(x({n}_{1}, {n}_{2})))$
• ${K}_{1}{K}_{4}\mod N$ and ${K}_{2}{K}_{3}\mod N=0$ Prime Factor Algorithm (PFA). $X(k)={\mathrm{DFT}}_{Ni}({\mathrm{DFT}}_{Nj})$ No twiddle factors!
A PFA exists only and always for relatively prime ${N}_{1}()$ , ${N}_{2}()$

## Conditions for short-length transforms to be dfts

${K}_{1}{K}_{3}\mod N={N}_{2}$ and ${K}_{2}{K}_{4}\mod N={N}_{1}$

Convenient choice giving a PFA
${K}_{1}={N}_{2}$ , ${K}_{2}={N}_{1}$ , ${K}_{3}={N}_{2}{N}_{2}^{-1}\mod {N}_{1}\mod {N}_{1}$ , ${K}_{4}={N}_{1}{N}_{1}^{-1}\mod {N}_{2}\mod {N}_{2}$ where ${N}_{1}^{-1}\mod {N}_{2}$ is an integer such that ${N}_{1}{N}_{1}^{-1}\mod =1$

${N}_{1}=3$ , ${N}_{2}=5$ $N=15$ $n=(5{n}_{1}+3{n}_{2})\mod 15$ $k=(10{k}_{1}+6{k}_{2})\mod 15$

• ## Checking conditions for one-to-oneness

$5={K}_{1}=a{N}_{2}=5a$ $3={K}_{2}=b{N}_{1}=3b$ $\gcd (5, 3)=1$ $\gcd (3, 5)=1$ $10={K}_{3}=a{N}_{2}=5a$ $6={K}_{4}=b{N}_{1}=3b$ $\gcd (10, 3)=1$ $\gcd (6, 5)=1$
• ## Checking conditions for reduced computation

${K}_{1}{K}_{4}\mod 15=5\times 6\mod 15=0$ ${K}_{2}{K}_{3}\mod 15=3\times 10\mod 15=0$
• ## Checking conditions for making the short-length transforms be dfts

${K}_{1}{K}_{3}\mod 15=5\times 10\mod 15=5={N}_{2}$ ${K}_{2}{K}_{4}\mod 15=3\times 6\mod 15=3={N}_{1}$
Therefore, this is a prime factor map.

## Operation counts

• ${N}_{2}$ length- ${N}_{1}$ DFTs ${N}_{1}$ length- ${N}_{2}$ DFTs ${N}_{2}{N}_{1}^{2}+{N}_{1}{N}_{2}^{2}=N({N}_{1}+{N}_{2})$ complex multiplies
• Suppose $N={N}_{1}{N}_{2}{N}_{3}{N}_{M}$ $N({N}_{1}+{N}_{2}++{N}_{M})$ Complex multiplies
radix-2 , radix-4 eliminate all multiplies in short-length DFTs, but have twiddle factors: PFA eliminates all twiddlefactors, but ends up with multiplies in short-length DFTs . Surprisingly, total operation counts end up being very similarfor similar lengths.

Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
hi
Loga
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
Got questions? Join the online conversation and get instant answers! By Richley Crapo By Laurence Bailen By Stephen Voron By OpenStax By OpenStax By Karen Gowdey By OpenStax By OpenStax By Yasser Ibrahim By OpenStax